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)
 How to apply distinct on two fields in a table

Author  Topic 

shankar.adi
Starting Member

2 Posts

Posted - 2006-07-18 : 01:20:31
Hi,
I have query like this,
SELECT dbo.eigendm.eige_id, dbo.eigendm.stor_id, dbo.eigendm.dier_id, dbo.eigendm.pers_id, dbo.eigendm.eige_fokk, dbo.persoon.pers_naam,
dbo.adressn.adre_postkde, dbo.adressn.adre_straat, dbo.adressn.adre_toevoeg, dbo.adressn.adre_huisnr, dbo.adressn.adre_plaats,
dbo.debteur.debt_telmob, dbo.debteur.debt_telefn, dbo.debteur.debt_website, dbo.debteur.debt_email, dbo.debteur.debt_telefax
FROM dbo.eigendm LEFT OUTER JOIN
dbo.debteur ON dbo.eigendm.debt_id = dbo.debteur.debt_id LEFT OUTER JOIN
dbo.adressn ON dbo.debteur.adre_id_lo = dbo.adressn.adre_id LEFT OUTER JOIN
dbo.persoon ON dbo.eigendm.pers_id = dbo.persoon.pers_id

I shouldn't get duplicates of dbo.eigendm.eige_id and dbo.eigendm.pers_id

Thanks and regards,
Shankar

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-07-18 : 01:52:13
Please post your table DDL, some sample data & result that you want. It is kind of difficult to understand what you want from your query.


KH

Go to Top of Page
   

- Advertisement -