Id Name MultipleDirectory
1 abc 1001,1003,1004
2 xyz 1002,1004
3 pqr 1003
table2
Id Directory
1001 asp
1002 vb
1003 asp.net
1004 javascript
Now My problem is that when i select Directory name- javascript from a gridview, then 2 names- abc & xyz will come out. Tell me what's the query i will execute?
thanks
Jan MontanoPosted Feb 10, 2008, 10:20 PM
INNER JOIN directory as d
ON ',' + u.multipledirectory + ',' LIKE '%,' + d.Id + ',%'
WHERE d.Directory = 'javascript'
If you can and have time to redesign your tables please do so. It's not a good idea to store many data in one column just like what you have in Users.MultipleDirectory.