AWQL dateRange syntax problem

1,023 views
Skip to first unread message

bionic

unread,
Sep 5, 2016, 4:14:15 AM9/5/16
to AdWords API Forum
I get - 'syntax error, unexpected ',' - when trying to establish a custom date range in an AWQL query for a CRITERIA_PERFORMANCE_REPORT

My query ends with - DURING 20160716, 20160902 - as per the only documentation I could find showing actual syntax (I assume) - https://developers.google.com/adwords/api/docs/guides/reporting#custom_date_ranges - check AWQL tab in first code sample.

The query works fine with things like DURING YESTERDAY or DURING LAST_7_DAYS

Any help appreciated.

Peter Oliquino

unread,
Sep 5, 2016, 5:54:27 AM9/5/16
to AdWords API Forum
Hi,

I was able to successfully generate a Criteria Performance Report using your date range in the sample AWQL query below :

SELECT CampaignId, CampaignName, Criteria, Date, Impressions, Clicks FROM CRITERIA_PERFORMANCE_REPORT DURING 20160716, 20160902

Could you try this one out and if the issue persists, could you also provide your complete report definition so I could better investigate the issue?

Best regards,
Peter
AdWords API Team

bionic

unread,
Sep 5, 2016, 6:09:46 AM9/5/16
to AdWords API Forum
Same problem Peter. I am using the example PHP script as the base. Do you want me to send a copy direct (with  or without login details?)

Peter Oliquino

unread,
Sep 5, 2016, 6:27:10 AM9/5/16
to AdWords API Forum
Hi,

Did you mean one of the examples in this link? You may send your report definition without your login details.

Cheers,
Peter
AdWords API Team

bionic

unread,
Sep 5, 2016, 6:32:19 AM9/5/16
to AdWords API Forum
Yes just like the AWQL version (2nd script)

This is the query:

SELECT Date, CampaignId, CampaignName, AdGroupId, AdGroupName, Id, Criteria, Clicks, Impressions, AverageCpc, Ctr, QualityScore, Cost, AveragePosition FROM CRITERIA_PERFORMANCE_REPORT WHERE Status IN [ENABLED] AND CampaignStatus IN [ENABLED] AND Clicks > 0 DURING 20160716, 20160902

Thanks for the help.

Peter Oliquino

unread,
Sep 5, 2016, 6:53:25 AM9/5/16
to AdWords API Forum
Hi,

Thank you for the information. I was still able to successfully generate the report using your complete AWQL query. If it isn't too much trouble, could you also provide which AdWords API version you are using?

bionic

unread,
Sep 5, 2016, 6:55:48 AM9/5/16
to AdWords API Forum
v201607 Peter

bionic

unread,
Sep 6, 2016, 2:44:56 AM9/6/16
to AdWords API Forum
Not enough information? Too difficult a problem? Any feedback appreciated.

Michael Cloonan (AdWords API Team)

unread,
Sep 6, 2016, 9:01:51 AM9/6/16
to AdWords API Forum
Hello,

Try removing the space after the comma, before the second date.

Instead of DURING 20160716, 20160902, try DURING 20160716,20160902.

If that doesn't work, I'll contact the owner of the PHP library to see if he's aware of any other limitations specific to PHP.

Regards,
Mike, AdWords API Team

bionic

unread,
Sep 6, 2016, 10:16:31 AM9/6/16
to AdWords API Forum
Thanks for the reply Mike. I did remove the space and same issue. Tried umpteen different ways of doing it but no go. My previous script was similar to the first example on the reference page. So leave it with me just for a bit and I will test it using that framework. Thanks.

bionic

unread,
Sep 6, 2016, 1:19:03 PM9/6/16
to AdWords API Forum
I reverted back to my previous script which was very similar to the first example on the reference page and after a couple of edits sorted the problem. Call it pragmatism as I didn't resolve the original problem, but I am happy now so lets say it is resolved?

Michael Cloonan (AdWords API Team)

unread,
Sep 6, 2016, 1:35:43 PM9/6/16
to AdWords API Forum
Hello,

I'm glad you got it working in some capacity! If you ever do figure out what the difference is between the working state now and the failing state you had, please let me know, in case anyone else ever runs into a similar issue.

Regards,
Mike, AdWords API Team
Reply all
Reply to author
Forward
0 new messages