I'm running a SQL query in GM and I'm stuck.
My current query looks for all "additional contacts" where the company is "RIA"
select contact1.key1, contact1.company, contact1.contact, contact1.address1, contact1.city, contact1.state, contact1.zip, contsupp.contact from contsupp JOIN contact1
on contact1.accountno= contsupp.accountno and contact1.company = "RIA" and contsupp.rectype = "C"
order by contact1.company
I want to add to that a user defined field in the contact2 db. I know that I need to somehow join the contact1, contsupp and contact2 db, I just don't know how to write it.
Any help is greatly appreciated.
My current query looks for all "additional contacts" where the company is "RIA"
select contact1.key1, contact1.company, contact1.contact, contact1.address1, contact1.city, contact1.state, contact1.zip, contsupp.contact from contsupp JOIN contact1
on contact1.accountno= contsupp.accountno and contact1.company = "RIA" and contsupp.rectype = "C"
order by contact1.company
I want to add to that a user defined field in the contact2 db. I know that I need to somehow join the contact1, contsupp and contact2 db, I just don't know how to write it.
Any help is greatly appreciated.