Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting multiple fields in one column
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01219371
Message ID:
01219407
Views:
7
>In principal we could do that. Unfortunately the street number field is a text field. I tried to cast it to a number and in some cases there is still text in the street number field and it won't cast without an error.
>If you know away around that problem as well I'dd appreciate it.

I'm assuming sql server for backend here. You should be able to test the field value with ISNUMERIC and use a case to determine whether to cast the value or not.

SELECT
CASE isnumeric(var_name)
WHEN 1 THEN cast(var_name AS int)
ELSE 0
END AS numaddress
FROM MyTable
Michael McLain
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform