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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-05-17 : 09:47:11
|
| kishore writes "in my data base category and news tow table is therewhen i am putting the news in table using the front ends then my news category can have multiple i mean one news can go multiple category so i am storing the catefory on the comma based like 2,3,4,5,6 so onso when i am making the search on the front ends i have writtn the query select * from news where cat_id like '%2%' so its also giving me all the record like 12,24 ,32 but i need only cat_id 2 so what would be the query for that to search only id 2 i used in cat ID in ('2') but its not right becus its only searc single records not comma based .although i have to use split but can u have a query for that without use of splitwaiting for ur reply ASP SQlfor developing tool" |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-05-17 : 09:57:30
|
| U have to normalize ur data.A workaround for ur question is using '%,2,%' instead of '%2%'Srinika |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|