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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select on multiple columns if > 5

Status
Not open for further replies.

Darkm00n

Programmer
May 15, 2003
2
AU
Hey all,

The tables I have are

PATIENT(P_ID, P_FName, P_LName, P_DOB, P_Sex, P_Eth, P_StreetNo, P_StreetName, P_Suburb,
P_Postcode, P_HPhone, P_WPhone, P_OccupName, P_OccupYears, P_Complaints, R_ID, D_ID)

METCOND(MetC_ID, MetC_DigestTot, MetC_EarsTot, MetC_EmotTot, MetC_EnerActiTot, MetC_EyesTot, MetC_HeadTot, MetC_HeartTot, MetC_JointMuscTot, P_ID)

Everything except for the two ID columns is a number out of 10. What i want to do is select on P_FName, P_LName and ONLY output the columns that have value > 5

For example
P_Fname P_LName MetC_DigestTot MetC_EarsTot
Rob Smith 7 6

P_Fname P_LName MetC_JointMuscTot
Fred Fitz 9

Is this possible? Cheers and thanks

 
Actually, I realize what i want is different. What I actually want is something like this:


P_Fname P_LName Above 5
Rob Smith MetC_DigestTot, MetC_EarsTot

So we have an Above 5 column, with the ones that are above 5 concatenated into one attribute.

How would I do this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top