October 19th, 2012, 09:27 AM
SQL statement for 2 tables?
I have two tables: GroupName and SelectGroup
on my website, I have dropdown menu box that display the data from table: GroupName.
What I like to do is on the dropdown menu only display the items that has not been selected by that UserID. The UserID is just a URL querystring.
Can someone please help me how to do about this?
October 19th, 2012, 03:55 PM
Found my solution here
FROM #a AS a
WHERE a.i NOT IN (SELECT b.j FROM #b AS b)
OR a.i IS NULL
October 20th, 2012, 04:05 AM