function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MegachuckmcMegachuckmc 

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.

JimRaeJimRae

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