I have a query that I'm trying to run...
InvImages has two fields ImageFile and AutoID.
Products has Name, CatID and Images. The current design is that products can have multiple images.. so in my query I wanted to run this query..
Images is filled with Image IDs..
One product's Images field may say 12 while another may say 34,35.
And it returns every row where one id is listed, but does not return rows where the Images field has two IDs or more..
Thanks for the help
ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
InvImages has two fields ImageFile and AutoID.
Products has Name, CatID and Images. The current design is that products can have multiple images.. so in my query I wanted to run this query..
Images is filled with Image IDs..
One product's Images field may say 12 while another may say 34,35.
Code:
select name,images,imagename,imagefile,autoid,new
from products,inventoryimages
where catID = #url.parent#
and convert(nvarchar(50),autoID) in (images)
And it returns every row where one id is listed, but does not return rows where the Images field has two IDs or more..
Thanks for the help
ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.