Happy Business Starts Here

Highlighted
Valued Scholar

ZOQL query error

Hi All,

 

I'm using ZOQL and post the following query:

select AccountNumber,Id, Name, SalesRepName, BillToId from Account

 

In return I get the error: which says there's a syntax error:

 

{
"errorCode" : "90005",
"message" : "There is a syntax error in one of the queries in the AQuA input",
"batches" : [ {
"localizedStatus" : "pending",
"recordCount" : 0,
"apiVersion" : "58.0",
"batchType" : "zoqlexport",
"full" : true,
"status" : "pending",
"query" : "select AccountNumber,Id, Name, SalesRepName, BillToId from Account limit 0,50;"
} ],
"useLastCompletedJobQueries" : false,
"encrypted" : "none",
"status" : "error",
"format" : "CSV",
"version" : "1.0",
"name" : "IConductQuery"
}

 

 

When I post the query without the BillToId field the query returns results fine.

What might be the problem?

 

Thanks,

Mike

 

Tags (2)
2 REPLIES 2
Support SME

Re: ZOQL query error

Hi @_mikeSmith if you use zoqlexport as your query type, you're working with data sources that can be pre-joined with each other, and not with the API objects where the objects structure is slightly different.

 

More resources on this - the first topic explains your specific example Smiley Happy

 

https://community.zuora.com/t5/API/Handling-AQuA-syntax-errors-ZOQL-vs-ZOQLEXPORT/m-p/15674#M728

 

https://knowledgecenter.zuora.com/CD_Reporting/D_Data_Sources_and_Exports/C_Data_Source_Reference/Ac...

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Valued Scholar

Re: ZOQL query error

Thank you very much @Viktor, that helped.