You might be right, but I still haven't managed to get it to work though.

I can get the label id, but neither of the following queries work:

SELECT AdGroupId FROM AD_PERFORMANCE_REPORT WHERE Labels EQUALS '49545027' 
DURING 20140801,20141122
SELECT AdGroupId FROM AD_PERFORMANCE_REPORT WHERE Labels CONTAINS [
'49545027'] DURING 20140801,20141122

I get:

googleads.errors.AdWordsReportBadRequestError: Type: QueryError.
INVALID_WHERE_CLAUSE







On Monday, November 24, 2014 11:11:22 AM UTC, Danial Klimkin wrote:
>
> Hello Joao,
>
>
> Filtering by Labels requires using label IDs, not texts. Pull the IDs for 
> the labels and add a filter using LabelIds column instead.
>
>
> -Danial, AdWords API Team.
>
>
> On Monday, November 24, 2014 12:53:36 PM UTC+3, João Aparício wrote:
>>
>> Hi
>>
>> In the reports, I'm trying to select for ads that contain (or don't 
>> contain) a certain label. Somehow I'm getting an error both from the API 
>> and from Scripts. The query is the following:
>>
>> SELECT AdGroupId FROM AD_PERFORMANCE_REPORT WHERE Labels CONTAINS_NONE ['my 
>> special label'] DURING 20140801,20141122
>>
>> From the API I'm getting:
>>
>> googleads.errors.AdWordsReportBadRequestError: Type: ReportDownloadError.
>> ERROR_GETTING_RESPONSE_FROM_BACKEND
>>
>> And from Scripts I'm getting:
>>
>> Failed to read from AdWords. Please wait a bit and try again. (line 6)
>>
>> Interestingly, the error messages are different if instead I use the 
>> CONTAINS operator, and suggest to me a syntax error. That is, the query:
>>
>> SELECT AdGroupId FROM AD_PERFORMANCE_REPORT WHERE Labels CONTAINS ['my 
>> special label'] DURING 20140801,20141122
>>
>> Returns from the API:
>>
>> googleads.errors.AdWordsReportBadRequestError: Type: QueryError.
>> INVALID_WHERE_CLAUSE
>>
>> And from Scripts:
>>
>> One of the conditions in the query is invalid. (line 6)
>>
>>
>> Any ideas?
>>
>> Best regards,
>> Joao
>>
>>
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/41c6d02f-e5db-4489-8ff1-f63d349d9e14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to