Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UDF for determining a character in a numeric string
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00733424
Message ID:
00733484
Views:
20
>Why not use LIKE?
>
>declare @ssn nvarchar(40)
>set @ssn = '123-45-6789'
>IF @ssn LIKE '[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]'
> print 'yes'
>else
> print 'no'
>
>-Mike
>
Maybe because it isn't on the top of my head? :)
Than again, how much T-SQL could somebody learn from that code? :)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform