Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cast(varchar column As Integer) fails
Message
From
07/07/2005 09:57:12
 
 
To
07/07/2005 09:22:28
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01029872
Message ID:
01029921
Views:
16
>Fabio,
>
>Molto grazie (is that correct?) - anyway, thank's a bunch.
>
>Although I'm not sure I understand the logic of it - why just 'E'?
>Is that really the only one that will convert to numeric?
>
>
For positive integers you can try with this:
SELECT CASE WHEN  '1234567890' LIKE LEFT('[0-1][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
,LEN('1234567890')*5) THEN 1 END

--SELECT CASE WHEN  DamageNo LIKE LEFT('[0-1][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
,LEN(DamageNo)*5) THEN 1 END
Previous
Reply
Map
View

Click here to load this message in the networking platform