2

We need to run a job on 1000's of records by filtering over an ID. In the dataloader when the condition section doesnt show IN or contains or LIke option.

However i tried to put a condition manually like : ID like ('a','b'). And the extract just pulled the record for 'a' , not for b.

How can I pass multiple Id's in my query?

Also my Id list would be quite a huge list about 3000 : does it look a feasible approach to consider?

2

LIKE is used to find wildcard matches. Instead, you would want to use the IN operator:

SELECT ... FROM ... WHERE ID IN ('A','B','C','D',...)

While the Data Loader probably won't show "IN" (because it's not designed to automatically build that filter), IN should definitely produce the desired output.

1
  • n.b. the excel TRANSPOSE function is useful for converting a column of IDs into a single string of comma-separated, delimited ids in case your ID list is coming from a SFDC report. This can be handy in building the IN (...) list
    – cropredy
    Jan 6 '15 at 18:24
1

One way to do this is to extract all the records in Excel Spreadsheet ( Hopefully your total records are less than 1 million).

Copy paste 3000 Ids in another Excel Spreadsheet and perform VLOOKUP Only for the Ids which you are going to Upload and save it as separate spreadsheet (Final Spreadsheet).

Then you upload your final Spreadsheet.

1
  • Thanks for replying : I user Notepadd ++ : it allowed me to build the string of ids. But when i was testing it using only two ids : ID IN('a','b')...it was pulling records only for the first ID. Let me test and check again,as none of you said it doesnt )
    – user10727
    Jan 6 '15 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.