General information
Forum:
Microsoft SQL Server
Title:
SQL Selection Problem
Hi all...
Here's 2 tables:
Table : Student
(Name) (Sub_id) (Marks)
Amy 1 30
Amy 2 50
Peter 2 40
Peter 3 40
Peter 4 50
Table : Subject
(Sub_id) (Desp)
1 Chinese
2 English
3 Maths
4 Phy
5 Chem
How to get the result on each student that
1) Chin, Eng, Math must display no matter he/she takes that subject or not
2) Do not display Phy/Chem if he/she not takes
Results:
(Amy)
Chinese 30
Eng 50
Maths null
(Peter)
Chinese null
Eng 40
Maths 40
Phy 50
Much Thanks!
Eva ^.^
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only