
May 18th, 2004, 12:42 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
|
|
Use the SUBSTRING, CHARINDEX and CONVERT functions. The SQL string would look something like this:
Code:
select * from table1
where col2 = CONVERT(INTEGER, SUBSTRING(col1, 0, CHARINDEX(',', col1)))
See the documentation of these functions in Books Online for more info.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month
Looking for a perl job with kick-*** programmers in a well-known NASDAQ listed tech company with branches in the US and Europe? We're hiring. PM me for details. Requirements
|