Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Mondeo
Constraint Violating Yak Guru
287 Posts |
Posted - 2007-09-26 : 04:20:39
|
| I've got a table with category names and id'sThen in a second table i've got product names and a field for category id's, this is in the format :1:23:4:56 - i.e. this product is in categories 1, 23, 4 and 56.I need to do somthing like thisSELECT * FROM products WHERE categoryID IN (SELECT cateogryID FROM categories WHERE type=1)But I need to split the :1:23:4:56 into 1, 23, 4, 56 and select where any of those cateogries are in that subquery.Thanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
|
|
|
|
|