Originally Posted by homerUK
sqlLstProds="Select * From PRODUCT_DEF "&_
"WHERE active = 1 AND productID IN(Select productID From PRODUCT_DEF WHERE (IDProductCriteria = 5) AND ([Value] = '"&getSession("ModelID")&"')) "&_
" Order By IDProduct, IDProductCriteria"
that should work?
Well that code assumes that the active column is in Product_def.
This queries the Product_Def table, however there is also a table called Product_sType, the primary key in that table is productID which corresponds to productID ub the Product_Def table.
So basically, it's somewhat of a join of some sort, like select * from Product_def, but only the rows where productID match the productID in Product_sType Where active = 1.
And that's what I cannot do. If you could help me out on this I would apreciate it.