Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Command Problem

Status
Not open for further replies.

vpaladan

Programmer
Nov 13, 2002
13
PH
Kindly Help. I have two tables.

Vessel.dbf
TCode Ratings Officers
111 Doehle Gemini

Experience.dbf
Tcode Rank
111 O && Officer

How to join tables/query to output the ff.

Tcode Rank Principal (if rank = “O”, officer, else ratings
111 O Gemini

Thanks in advance

Vic
 
Select vessel.tcode, experience.rank, iif(experience.rank = "O", vessel.officers, vessel.ratings) as principal from vessel, experience where vessel.Tcode = experience.Tcode into cursor mycursor




Slighthaze = NULL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top