You need to sign in to do that
Don't have an account?
SOQL Question - Apex Data Loader - Unexpected Error
I am attempting to run a query from the Apex Data Loader in the Command Line mode. When I attempt to run the following query, I get the following error:
Select Opportunity.Probability, OpportunityLineItem.Quantity, PricebookEntry.ProductCode FROM Opportunity WHERE Opportunity.ID=OpportunityLineItem.OpportunityId AND OpportunityLineItem.PricebookEntryId=PricebookEntry.ID
Error [csvAccountExtract] progress.NihilistProgressAdapter doneError <NihilistProgressAdapter.java:51> Opportunity WHERE OpportunityLineItem.OpportunityId ERROR at Row:1:Column:128
Any help would be greatly appreciated.
Thanks in advance
Robert
After many hours of reading this is the query inside the java bean that worked:
Select Quantity, Opportunity.Probability, PricebookEntry.ProductCode, PricebookEntry.Product2.TestPeriod__c FROM OpportunityLineItem WHERE Opportunity.Contract_Start_Date__c >2009-06-30 AND (PricebookEntry.ProductCode LIKE 'Bundle P%'OR PricebookEntry.ProductCode LIKE 'P-%') AND Opportunity.Probability > 59
Hope this can help someone in the future.
Thanks
All Answers
After reading some more, I believe that the Apex Data Loader will only allow queries with relationships of child to parent. What I am trying to do is get a file with the following three fields:
Probability from the Opportunity Table
Quantity from the OpportunityLineItem Table
ProductCode from the PricebookEntry Table
Any assistance would be greatly appreciated.
Robert
After many hours of reading this is the query inside the java bean that worked:
Select Quantity, Opportunity.Probability, PricebookEntry.ProductCode, PricebookEntry.Product2.TestPeriod__c FROM OpportunityLineItem WHERE Opportunity.Contract_Start_Date__c >2009-06-30 AND (PricebookEntry.ProductCode LIKE 'Bundle P%'OR PricebookEntry.ProductCode LIKE 'P-%') AND Opportunity.Probability > 59
Hope this can help someone in the future.
Thanks