Skip to main content Take our 5-minute Community Survey. Open now through 4/11/2025. Click here to participate.

I'm sending a query to SalesForce (using the SOAP API) that includes an IN clause, however, I keep getting a MALFORMED_QUERY error.  Could someone point me in the right direction of what the query syntax is when using the IN clause?  I've tried the following without success (the ids are made up in these examples):

 

SELECT Id FROM Lead WHERE Id IN {'000000000000000','111111111111111'}

SELECT Id FROM Lead WHERE Id IN '0000000000000','111111111111111'

 

Thanks.

5 answers
  1. Nov 1, 2012, 9:55 PM

    You're close 

     

    select id from lead where id in ('00Q3000000zLxkFEAS', '00Q3000000eODvUEAW')

Loading
0/9000