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.
| Author |
Topic |
|
jhon11
Starting Member
42 Posts |
Posted - 2007-11-09 : 15:51:21
|
| Hi,I have write down following query ..select a.patientid, a.provideridfrom PatientDrugList aJOIN Admin..Loadinstance b on a.intLoadInstanceId = b.intLoadInstanceIdwhere a.MailReasonTypeId = -1and b.SubClientId = 22and b.StatusTypeId > 0Now how could I get distinct patientid count and distinct providerid count Reply soon |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-11-09 : 15:57:01
|
Reading Books Online makes me wanna tryselect count(distinct a.patientid), count(distinct a.providerid)from PatientDrugList as ainner JOIN Admin..Loadinstance as b on b.intLoadInstanceId = a.intLoadInstanceIdwhere a.MailReasonTypeId = -1and b.SubClientId = 22and b.StatusTypeId > 0 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
jhon11
Starting Member
42 Posts |
Posted - 2007-11-09 : 16:00:27
|
| Thx a lot ... |
 |
|
|
|
|
|