Happy Business Starts Here

Honor Student

ZOQL query error

I am trying to write a ZOQL query. But I keep getting an error saying that particular object does not exist. How do I approach this issue?

6 REPLIES 6
Zuora Alumni

Re: ZOQL query error

Hi,

 

Can you provide to us in detail of your ZOQL query?  Thanks.

 

Robert



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

Honor Student

Re: ZOQL query error

I figured that out. But I have another question. This is the query I have. 

SELECT count(*), date(invoicedate)
FROM Invoice
WHERE Balance > 0 and Status = 'Posted'
group by date(invoicedate)

 

I want to also group by week in month. Like week 1, week 2, etc., Can you tell me how I can do that with the above query? Thanks!

Zuora Alumni

Re: ZOQL query error

We will need to do some test on our end and will get back to you.



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

Highlighted
Zuora Alumni

Re: ZOQL query error

 

Hi @Sravanik

 

You are receiving a query error because ZOQL does not support your request of complex queries such as *.  

 

Please take a look at the image below: 

Screen Shot 2017-06-19 at 3.24.24 PM.png

 

For more information, please visit the ZOQL Knowledge Center

 

 



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

Tags (1)
Honor Student

Re: ZOQL query error

If you meant the count(*), that does not give me an error. 

Support SME

Re: ZOQL query error

Hello @Sravanik please note ZOQL and ZOQLEXPORT queries use slightly different syntaxes, and they support slightly different features, it's important to note these.

 

The example you've posted above is clearly ZOQLEXPORT since regular ZOQL does not support grouping (actuall y neither does ZOQLEXPORT, however the query you've provided looks closer to a ZOQLEXPORT compared to a simple ZOQL API query).

 

I suggest reviewing my topic for the aforementioned differences:

 

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

 

Supporting references regarding the limitations of each method:

 

https://knowledgecenter.zuora.com/DC_Developers/T_Aggregate_Query_API/B_Submit_Query

https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL

https://knowledgecenter.zuora.com/DC_Developers/K_Zuora_Object_Query_Language



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