|
lindyholic
Starting Member
2 Posts |
Posted - 2010-10-07 : 18:56:43
|
| Hi there.I'm trying to write an SQL Query in my DB program to include the spouse on the same line as the main contact. The spouse holds a seperate table. Essentially, I want the church name, family name, main contact name, spouse name, address, etc. I can get all of this with the spouse taking up the second line, but I want the spouse name included. What I am getting right nowParish Name, Last Name, First Name, Address, etc. (Main contact)Parish Name, Last Name, First Name, Address, etc. (Spouse)What I want isParish Name, Last Name, First Name (main contact), First Name (spouse), Address, etc.Here is the code I put in for the first result:SELECTParish.C_name, House.family_nam, people.first_name, house.address1, house.address2, house.city, house.prov, house.postal_cod, house.housphone1FROM people, house, parishWHERE Record_Lev < 3 AND house.family_id = people.family_idI appreciate the help.-Harrison |
|