Click here to Skip to main content
15,898,222 members
Home / Discussions / Database
   

Database

 
QuestionSQL 2000 Query Pin
CodingYoshi11-Aug-09 11:26
CodingYoshi11-Aug-09 11:26 
AnswerRe: SQL 2000 Query Pin
Syed Mehroz Alam11-Aug-09 21:36
Syed Mehroz Alam11-Aug-09 21:36 
GeneralRe: SQL 2000 Query Pin
CodingYoshi12-Aug-09 3:00
CodingYoshi12-Aug-09 3:00 
QuestionOf databases and the sacrifice of live chickens Pin
gantww11-Aug-09 9:31
gantww11-Aug-09 9:31 
AnswerRe: Of databases and the sacrifice of live chickens Pin
Mycroft Holmes11-Aug-09 15:01
professionalMycroft Holmes11-Aug-09 15:01 
GeneralRe: Of databases and the sacrifice of live chickens Pin
gantww12-Aug-09 3:09
gantww12-Aug-09 3:09 
AnswerRe: Of databases and the sacrifice of live chickens Pin
David Skelly11-Aug-09 22:36
David Skelly11-Aug-09 22:36 
AnswerRe: Of databases and the sacrifice of live chickens Pin
WoutL12-Aug-09 20:06
WoutL12-Aug-09 20:06 
Questiontwo questions regarding a big database table Pin
Seraph_summer11-Aug-09 8:48
Seraph_summer11-Aug-09 8:48 
AnswerRe: two questions regarding a big database table Pin
David Mujica11-Aug-09 10:12
David Mujica11-Aug-09 10:12 
AnswerRe: two questions regarding a big database table Pin
Mycroft Holmes11-Aug-09 15:09
professionalMycroft Holmes11-Aug-09 15:09 
QuestionSQL DATABASE Pin
kibromg11-Aug-09 6:43
kibromg11-Aug-09 6:43 
AnswerRe: SQL DATABASE Pin
Hristo-Bojilov13-Aug-09 5:04
Hristo-Bojilov13-Aug-09 5:04 
QuestionCase Sensitive User Name Pin
janani1311-Aug-09 2:38
janani1311-Aug-09 2:38 
AnswerRe: Case Sensitive User Name Pin
Luc Pattyn11-Aug-09 3:30
sitebuilderLuc Pattyn11-Aug-09 3:30 
QuestionHow to change the default port 1433 for SQLServer 2008 Pin
Paramu197311-Aug-09 1:03
Paramu197311-Aug-09 1:03 
AnswerRe: How to change the default port 1433 for SQLServer 2008 Pin
Paramu197311-Aug-09 4:18
Paramu197311-Aug-09 4:18 
QuestionHow to Concate more than one rows in one row ?. Pin
Fazal Vahora10-Aug-09 21:41
Fazal Vahora10-Aug-09 21:41 
AnswerRe: How to Concate more than one rows in one row ?. Pin
infneeta10-Aug-09 23:46
infneeta10-Aug-09 23:46 
QuestionOuter Join issues Pin
Mustafa Ismail Mustafa10-Aug-09 4:45
Mustafa Ismail Mustafa10-Aug-09 4:45 
AnswerRe: Outer Join issues Pin
leckey10-Aug-09 5:26
leckey10-Aug-09 5:26 
GeneralRe: Outer Join issues Pin
Mustafa Ismail Mustafa10-Aug-09 5:44
Mustafa Ismail Mustafa10-Aug-09 5:44 
More like merge them but with the repeated columns removed (PatientID & AdmittanceID).

In a way, I'd want results of the query to be as such: (based on the tables given in the OP)

(Table1) (Table1) (Table1) (Table2)
PatientID AdmittanceID SymptomID Symptom
============================================================
1234 1 1 NULL
1234 1 3 NULL
1234 1 NULL This is a symptom



Makes sense?

[Edit] I just realized that the tables aren't very clear. Try this:

Table 1

PatientIDAdmittanceIDSymptomID
123411
123413


Table 2

PatientIDAdmittanceIDIDSymptom
123411This is a symptom


Wanted result

PatientIDAdmittanceIDSymptomIDSymptom
123411NULL
123413NULL
12341NULLThis is a symptom


What I get:


PatientIDAdmittanceIDSymptomIDSymptom
123411This is a symptom
123413This is a symptom


If the post was helpful, please vote, eh!

Current activities:
Book: Devils by Fyodor Dostoyevsky
Project: Hospital Automation, final stage
Learning: Image analysis, LINQ

Now and forever, defiant to the end.
What is Multiple Sclerosis[^]?

GeneralRe: Outer Join issues Pin
DoctorMick10-Aug-09 6:28
DoctorMick10-Aug-09 6:28 
GeneralRe: Outer Join issues Pin
Mustafa Ismail Mustafa10-Aug-09 9:34
Mustafa Ismail Mustafa10-Aug-09 9:34 
GeneralRe: Outer Join issues Pin
i.j.russell10-Aug-09 8:12
i.j.russell10-Aug-09 8:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.