Ianpbaker
May 15th, 2000, 10:56 PM
I dont think any one will be able to help me here, but if you, can I will Marry you.:D
Below is A SQL statement that grabs various details for all hotels that in tblmultimedia AND have passwords in tblPasswords that are in a certain city and are online. The problem is that in the table tblmultimedia there are up to twenty records for each hotel and each with a field called description. What I need to do is for each record that matches in the query, to display the all the descriptions for that hotel but still having only one record per hotel in the query result. This sounds and is very nasty and I've got a feeling I need some nested queries but I have'nt got the foggiest how to start.
The following does the first part and selects the right hotels I just need the second part
SELECT DISTINCT mult.hotelkey, pass.password, hot.hotelname, cont.faxno, cont.phoneno, cont.title, cont.firstname, cont.surname
FROM tblMultimedia AS mult, tblpassword AS pass, tblhotels AS hot, tblcontacts AS cont
WHERE mult.hotelkey = pass.hotelkey AND mult.hotelkey = hot.hotelkey AND mult.hotelkey = cont.hotelkey AND hot.location = [please enter location code] AND mult.online = 1;
Cheers in advance for any Help
Ian
Below is A SQL statement that grabs various details for all hotels that in tblmultimedia AND have passwords in tblPasswords that are in a certain city and are online. The problem is that in the table tblmultimedia there are up to twenty records for each hotel and each with a field called description. What I need to do is for each record that matches in the query, to display the all the descriptions for that hotel but still having only one record per hotel in the query result. This sounds and is very nasty and I've got a feeling I need some nested queries but I have'nt got the foggiest how to start.
The following does the first part and selects the right hotels I just need the second part
SELECT DISTINCT mult.hotelkey, pass.password, hot.hotelname, cont.faxno, cont.phoneno, cont.title, cont.firstname, cont.surname
FROM tblMultimedia AS mult, tblpassword AS pass, tblhotels AS hot, tblcontacts AS cont
WHERE mult.hotelkey = pass.hotelkey AND mult.hotelkey = hot.hotelkey AND mult.hotelkey = cont.hotelkey AND hot.location = [please enter location code] AND mult.online = 1;
Cheers in advance for any Help
Ian