Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Too many rows returned - why??

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-10-18 : 11:45:22
Captain SQL writes "This query seems to be returning too many rows.
How come?

SELECT cp.*, cp2.*, cat.*, cat2.*
FROM category_product_link cp
INNER JOIN category cat
ON
cp.cat_id = cat.cat_id
INNER JOIN category_product_link cp2
ON
cat.cat_id = cp2.cat_id
INNER JOIN category cat2
ON
cat2.cat_id = cp2.cat_id
WHERE cat.cat_id = cp.cat_id
AND cat2.cat_id = cp2.cat_id"
   

- Advertisement -