I have 2 tables.
table1:
CatID
Name
Description
table2:
SubCatID
Name
Description
I have the CatID and SubCatID and I want to resolve these back to the associated names. I could do two queries, but I'm sure it's possible in one query.
select [Name] FROM table1 WHERE CatID = $CatID;
select [Name] FROM table2 WHERE SubCatID = $SubCatID;
I thought maybe
select a.[Name], b.[Name]
FROM table1 a, table2 b
WHERE a.CatID=$CatID
AND b.SubCatID=$SubCatID
Also tried an OR in the where clause, but no go. Any advice?Statistics: Posted by Satis — Fri Feb 16, 2007 9:52 am
]]>