[dba-SQLServer] Convert Characters to Number

David Emerson newsgrps at dalyn.co.nz
Tue Jul 5 22:59:33 CDT 2005


SQL2000.

I have a varchar field that stores text.  Sometimes the first 2 characters 
will be a number.  I am looking for an easy way to check if the first two 
characters are a valid number, and then convert them to a number so that I 
can do some comparisons with other numbers.

Regards

David Emerson
Dalyn Software Ltd
25 Cunliffe St, Churton Park
Wellington, New Zealand
Ph/Fax (04) 478-7456
Mobile 027-280-9348 




More information about the dba-SQLServer mailing list