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 |
|
ilimax
Posting Yak Master
164 Posts |
Posted - 2009-11-11 : 19:24:33
|
| Visit tableVisIDNurseDocVisitDetails tableVisIDNursDocIDthere is relatiship VisID, and NurseDocID has same ID as Nurse and Doc in Visit tableSelect Visit.VisID, VisitDetails.NurseDocIDfrom Visit INNER JOIN VisitDetails ONVisit.VisID = VisitDetails.VisID AND (Visit.Nurse = VisitDetails.NurseDocID OR Visit.Doc = VisitDetails.NurseDocID)I see this my query does not work ...this OR in this part (Visit.Nurse = VisitDetails.NurseDocID OR Visit.Doc = VisitDetails.NurseDocID) will not work ....I need all records from Visit table that I am sure both Nurse and Doc has own row in VisitDetails table .... |
|
|
ilimax
Posting Yak Master
164 Posts |
Posted - 2009-11-11 : 20:03:18
|
| I can not beleive there is no help for me .... |
 |
|
|
ilimax
Posting Yak Master
164 Posts |
Posted - 2009-11-11 : 22:04:06
|
| or .. if I can make query where I display records only if I have 2 rows in VisitDetails for same visit ... |
 |
|
|
ilimax
Posting Yak Master
164 Posts |
Posted - 2009-11-11 : 22:04:26
|
| I am so blind ... I do not have any idea ... |
 |
|
|
|
|
|