Saturday, 15 January 2011

report - Pulling distinct value from results -


I work at a small healthcare institution and I need to pull all the providers for one of my clients It is our system setup, I have to draw examples from the transaction log that shows complete and incomplete I'm getting, but I want to hide duplicicate patient_id

  select p.attending_id, p.status, p.patient_id from patient_clin_tran p where p.attending_id = 00000380 by order p.patient_id < / Code>  

A quick peak of my result looks like 00000380 CO 00000036 00000380 CA 00000036
00000380 CA 00000093
00000380 CA 00000093
00000380 CO 00000093
00000380 CO 00000093 < 00000380 CO 00000093, 00000380 CO 00000093
00000380 CA 00000093

I do not want to show the duplicate patient_id. I was hoping that I could order separately, but no one. I'm just a SQL knob covering someone, so if I'm super easy then I apologize. After sorting on the basis of the situation, I will put it in crystal report. If anyone has to do this, then I can make a crystal report that will ask me to be present before opening it - it will be amazing, but I will take whatever I can. thank you in advanced!

Try SELECT DISTINCT explained



No comments:

Post a Comment