You need to sign in to do that
Don't have an account?
ThomasG
Selecting data from multiple tables
Hello!
I'd like to select the same kind of data from both the Lead and Contact tables, but would like to avoid having to do 2 different queries.
For example, we want to set up some kind of member system, which works in relation with the e-mail address of our leads and contacts. So, I'd like something that'd give a result similar to what you'd get with the UNION keyword in SQL ('SELECT email FROM Lead WHERE email = "xxx@xxx.xx" UNION SELECT email FROM Contact WHERE email = "xxx@xxx.xx"').
If I can't do everything in just one query, that means I'd have to first check if the mail exists in contacts, and if not, then search in leads. It'd be a bit tedious to do that for everything.
Does anyone have a nice solution?
Thanks.
I'd like to select the same kind of data from both the Lead and Contact tables, but would like to avoid having to do 2 different queries.
For example, we want to set up some kind of member system, which works in relation with the e-mail address of our leads and contacts. So, I'd like something that'd give a result similar to what you'd get with the UNION keyword in SQL ('SELECT email FROM Lead WHERE email = "xxx@xxx.xx" UNION SELECT email FROM Contact WHERE email = "xxx@xxx.xx"').
If I can't do everything in just one query, that means I'd have to first check if the mail exists in contacts, and if not, then search in leads. It'd be a bit tedious to do that for everything.
Does anyone have a nice solution?
Thanks.