Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 SELECT DISTINCT - SQL Server
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 24 April 2001 :  08:26:58  Show Profile  Visit Kat's Homepage
Does anyone know why this does not remove duplicate rows?


SELECT DISTINCT
tblProductPairings.l_CompanyID,
tblCompany.b_designer,
tblCompanyContact.s_CompanyName,
tblProductPairings.l_ProductPairingID,
tblProductPairings.l_GarmentID,
tblProductPairings.l_ProductSectorID FROM
tblProductPairings JOIN tblCompanyContact ON
tblCompanyContact.l_CompanyID =
tblProductPairings.l_CompanyID JOIN
tblCompany ON tblCompany.l_CompanyID =
tblProductPairings.l_CompanyID WHERE
tblProductPairings.l_CompanyID = 35 OR
tblProductPairings.l_CompanyID = 36 OR
tblProductPairings.l_CompanyID = 37 OR
tblProductPairings.l_CompanyID = 38 OR
tblProductPairings.l_CompanyID = 39 OR
tblProductPairings.l_CompanyID = 40 OR
tblProductPairings.l_CompanyID = 41 OR

tblProductPairings.l_CompanyID = 42 OR

tblProductPairings.l_CompanyID = 43 OR

tblProductPairings.l_CompanyID = 44 AND
l_GarmentID & 2 > 0



KatsKorner

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 24 April 2001 :  09:10:33  Show Profile  Visit Kat's Homepage
It is fixed now. I had forgotton to put brackets around the OR clauses and the AND was not relating to the correct part of the statement.



KatsKorner
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07