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
 Development Tools
 ASP.NET
 Getting distinct values

Author  Topic 

Swati Jain
Posting Yak Master

139 Posts

Posted - 2008-01-11 : 07:56:44

select distinct Patients.patientid , * from medications,patients where Patients.Patientid=medications.Patientid
Order by Patients.patientid ,medications.Patientid

This query is not giving the distinct patientid what may be going wrong with this query

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-11 : 08:07:42
quote:
Originally posted by Swati Jain


select distinct Patients.patientid , * from medications,patients where Patients.Patientid=medications.Patientid
Order by Patients.patientid ,medications.Patientid

This query is not giving the distinct patientid what may be going wrong with this query



Can you post some sample data and the result you want?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -