Join question in SQL Server - create statement
Posted on 2013-01-28
I have a table called tblcategory. It has all of my categories like below:
my second table is subcategories. This is like so:
my last table is the link between the 2. It is called tblLinkCategory. It contains all of the subcategories per a category. So it is set like this:
lnkcatnumber (which is the category) lnkscatnumber (which is the subcategory)
What I'd like to do is get a list - with a sql stmt - and read the tbllinkcategory and show me, by name what subcategories are found for a particular category. I struggle with joins so I'm not sure where to start.
I'd also like the sql stmt to show be the subcategories that weren't found connected to a particular category as well. I am using t-sql.
Thanks so much in advance.