By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

Is This query possible?

P: 4
I have three tables tblPatient(which contains patient info) tblContacts (which contain names to contact in an emergency) and tbltelephone (which holds phone numbers for patients and contacts. I need to create a query that gets patient first name, patient last name, and just patient phone numbers.

My tbltelephone is set up like this
phoneID PK
PateintID FK
ConatctID FK

Is the above mentioned query possible or should I restructure my tables?
Aug 12 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 14,534
Try this it might work:

SELECT tblPatient.FirstName, tblPatient.LastName, tbltelephone.PhoneNo
FROM (tblPatient INNER JOIN tbltelephone ON tlbPatient.PatientID=tbltelephone.PatientID);
Aug 12 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.