+ Start a Discussion

SOQL Query problem wit DataLoader

Why do I get a "Malformed Query" error with the following SOQL Query?


SELECT Account.Name, Name, Amount, Probability, ExpectedRevenue, (SELECT  Quantity, TotalPrice, UnitPrice, pricebookentry.productcode FROM OpportunityLineItems) FROM Opportunity Where amount > 4000000


Is it because I'm trying to do nested queries?

Is it because I'm trying to do a query that has relationships in it?


The force.com Developers manaul and Cookbook say that both of these are supported!  The query actually works when I test it with the Apex Explorer SOQL Test tool!

But when I run the query in the Apex DataLoader (14.0, 15.0) I get a "Malformed Query" error with no indication of what is wrong with the query!


There must be someone out there that can figure this out.


According to the Data Loader documentation, it does not support nested queries or child queries, but does support parent field queries.