View Single Post
  #6 (permalink)  
Old January 10th, 2005, 08:49 PM
sprion sprion is offline
Registered User
 
Join Date: Jan 2005
Location: Singapore, , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ahh .. i get it .. these is wat i should provide :X

[personnel table]
[SocialID] [Rank] [Name]
8403213D PTE John
8401234A MSG Dick
8404321B BG Tom
8405555F CPL Harry

[Next of Kins table]
[personal_sid] [nokRelationship] [nokContact]
8403123D Mother 91234567
8403123D Father 95435425
8403123D Sister 97856867
8401234A Spouse 92348432
8404321B Daughter 95436546

Basically, I neeed my results to show ALL personnel, even though he does not have a NOK. (a simple join will not show CPL HARRY as he has no NOK entered)

Also, to keep my final results count correct, I need PTE John to appear just once and not 3 times since he has 3 NOKs entered.

MY BAD results:
8403213D PTE John Mother 91234567
8403213D PTE John Father 95435425
8403213D PTE John Sister 97856867
8401234A MSG Dick Spouse 92348432
8404321B BG Tom Daughter 95436546

MY WANTED results:
8403213D PTE John Mother 91234567
8401234A MSG Dick Spouse 92348432
8404321B BG Tom Daughter 95436546
8405555F CPL Harry


thanks for all the help!! :)