You need to sign in to do that
Don't have an account?

SOQL with two IN in where clause with list as input
Hello All,
My query is ::
select id , name from account where name IN : NameList AND email IN : EmailList
Scenario ::
I am inserting data via dataloader with below details.
Name 1 xxx@yyy.com
Name 2 sss@rrr.com
Name 3 fff@uuu.com
I am trying to check in system on account object before insert whether any account record exists with the name and email combination.
Let me know whether two IN parameters as list in where clause will look for the data in the combination i gave ?
Ex :: Name 1 with only xxx@yyy.com and not with sss@rrr.com & fff@uuu.com
Thanks
My query is ::
select id , name from account where name IN : NameList AND email IN : EmailList
Scenario ::
I am inserting data via dataloader with below details.
Name 1 xxx@yyy.com
Name 2 sss@rrr.com
Name 3 fff@uuu.com
I am trying to check in system on account object before insert whether any account record exists with the name and email combination.
Let me know whether two IN parameters as list in where clause will look for the data in the combination i gave ?
Ex :: Name 1 with only xxx@yyy.com and not with sss@rrr.com & fff@uuu.com
Thanks
It will not check combination instead it will give you result where Name match with any of provided list and email match with any of provided list. You need to then loop throw matched records and do comparision again in apex. You still need to query records so you got matching records but for one and one matching you need to have apex code.
Thanks!