[thelist] SQL Server: How Can I Convert VARCHAR to INT?

rudy r937 at interlog.com
Thu Aug 16 11:48:22 CDT 2001


> BTW, if anyone does have a SQL server trick to do this,
> I would still be interested in hearing it.

not yet, james, i'm still thumbing through my couple of dog-eared
sql/server books (one o' them is 4.5) looking for functions that might
help, and so far, nothin'

what about a stored proc?  with looping at your disposal, you can look at
each character of the field and discard the ones that aren't numbers, and
*then* do a cast...

of course, if this is a one-shot deal, do it outside the database as
anthony suggested...


rudy





More information about the thelist mailing list