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 |
|
wshtrue
Yak Posting Veteran
74 Posts |
Posted - 2005-06-28 : 21:15:32
|
| Hello,Can anyone help me with this problem.OK!i need to see 3 results, One only Applnumber and no PatientInfo.TableApplNumber PatientInfo001001001When i put 001 in the search column of GUI it should return only one record with ApplNumber 001 and not 3 records.Right now i gave you just an example.I have no clue which Applnumbers are there where PatientInfo is NullSecond Query i need that i should get ApplNumber with one medicine only which will show under Patientinfo for an exampleIt would beTableApplNumber PatientInfo001 001 05What query should i give that i just get two records with ApplNumber 001Result should be TableApplNumber PatientInfo001001 05My GUI needs to show me only records where patientInfo is 05. It will not show any records where there is only ApplNumber but no PatientInfoMy third Query isTableApplNumber PatientInfo001 001 05001 07Now i need to see more than one record with the same ApplNumber so My GUI needs to show me records where patientInfo is 05 & 07. It will not show any records where there is only ApplNumber but no PatientInfoI hope i was clear.Please do not use these field values. I want queries without these values.If i know these values then i can write queries myself. Imagine we do not know the values. Thank you in advance |
|
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2005-06-28 : 22:18:40
|
| [code]select distinct applnumber, patientinfo from Tablet[/code]--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
|
|
|
|