Is it possible to construct a SOQL query with a list literal in the WHERE clause? My use case is that the data loader cannot handle child relationships/subqueries needed for my search, but I can get the full list of IDs to export and would like to submit a query along the lines of
[Select Id, Name, ... from Account WHERE Id in ('Id1', 'Id2',... ) ]
Since this is the DataLoader, I can't just use a variable list either. Or does someone know an alternate way to export queried data?
Best Answer
If you cannot get an answer or the list in lengthy, What I have done in the past is:
then in the data loader for export I simply used EmportData__c = true in the where clause