I have two tables, leads and mortgages that have a one to many relationship. The relationship exists in these two tables with the id field that is in both tables. In the leads table the mortgage id will be unique, in the mortgage table this id can be duplicated. Currently I am using the following query:
select leads.fname, leads.lname, mortgage.id from leads, mortgages where leads.id = mortgage.id
this returns something that looks like this
fname lname name
jon doe wamu
jon doe county
jane doe wells
jane doe indy
What I want the return to look like would be the following:
fname lname name1 name2
jon doe wamu country
jane doe wells indy
Any assistance requested please do let me know?
select leads.fname, leads.lname, mortgage.id from leads, mortgages where leads.id = mortgage.id
this returns something that looks like this
fname lname name
jon doe wamu
jon doe county
jane doe wells
jane doe indy
What I want the return to look like would be the following:
fname lname name1 name2
jon doe wamu country
jane doe wells indy
Any assistance requested please do let me know?