SQL HELP!!!

B

BillB

This query is returning 2 results, each are the identical column. in this
case the record it's duplicating is. product_ID 25

I can't figure out why and truth is I'm not even sure if I'm providing
enough information for you to help.

Here is the query

SELECT tbl_products.product_ID, tbl_products.product_MerchantProductID,
tbl_products.product_Name, tbl_products.product_Description,
tbl_products.product_ShortDescription, tbl_products.product_Sort,
tbl_products.product_special, tbl_products.product_OnWeb,
tbl_products.product_Archive, tbl_products.product_shipchrg,
tbl_prdtcat_rel.prdt_cat_rel_ID, tbl_prdtcat_rel.prdt_cat_rel_Product_ID,
tbl_prdtcat_rel.prdt_cat_rel_Cat_ID, tbl_prdtcategories.category_ID,
tbl_prdtcategories.category_Name, tbl_prdtcategories.category_archive,
tbl_prdtcategories.category_sortorder, tbl_prdtscndcat_rel.prdt_scnd_rel_ID,
tbl_prdtscndcat_rel.prdt_scnd_rel_Product_ID,
tbl_prdtscndcat_rel.prdt_scnd_rel_ScndCat_ID, tbl_prdtscndcats.scndctgry_ID,
tbl_prdtscndcats.scndctgry_Name, tbl_prdtscndcats.scndctgry_Archive,
tbl_prdtscndcats.scndctgry_Sort, tbl_prdtimages.prdctImage_ID,
tbl_prdtimages.prdctImage_ProductID, tbl_prdtimages.prdctImage_ImgTypeID,
tbl_prdtimages.prdctImage_FileName, tbl_prdtimages.prdctImage_SortOrder
FROM (((((tbl_prdtcategories INNER JOIN tbl_prdtcat_rel ON
tbl_prdtcat_rel.prdt_cat_rel_Cat_ID=tbl_prdtcategories.category_ID) INNER
JOIN tbl_products ON
tbl_products.product_ID=tbl_prdtcat_rel.prdt_cat_rel_Product_ID) INNER JOIN
tbl_prdtscndcat_rel ON
tbl_prdtscndcat_rel.prdt_scnd_rel_Product_ID=tbl_products.product_ID) INNER
JOIN tbl_prdtscndcats ON
tbl_prdtscndcats.scndctgry_ID=tbl_prdtscndcat_rel.prdt_scnd_rel_ScndCat_ID)
INNER JOIN tbl_prdtimages ON
tbl_prdtimages.prdctImage_ProductID=tbl_products.product_ID) INNER JOIN
tbl_list_imagetypes ON
tbl_list_imagetypes.imgType_ID=tbl_prdtimages.prdctImage_ImgTypeID
WHERE tbl_products.product_special=1 AND tbl_products.product_OnWeb = 1 AND
tbl_products.product_Archive = 0
ORDER BY tbl_products.product_Sort;

Any help would be greatly appreciated
 
J

John Vinson

This query is returning 2 results, each are the identical column. in this
case the record it's duplicating is. product_ID 25

One of the joined tables has two records for Product_ID 25.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top