Re: GAQL String Query | How to Select Campaign by Campaign ID

2021-07-13 Thread Pete Lavetsky (AdWords API Guru)
Hey Reid, Use the GAQL query builder to validate your queries : https://developers.google.com/google-ads/api/fields/v8/campaign_query_builder SELECT campaign.id, campaign.name, campaign.vanity_pharma.vanity_pharma_text FROM campaign WHERE campaign.id = 11031113693 Pete On Monday, July 12, 20

Re: GAQL String Query | How to Select Campaign by Campaign ID

2021-07-13 Thread 'reid hommedahl' via AdWords API and Google Ads API Forum
Hi Pete, Thanks for the help here! I was able to successfully filter by campaign ID. How would I write this if there are multiple campaign IDs? I tried using commas, ampersands, and even writing another WHERE statement. All resulted in errors. Any help you could provide here would be really ap

RE: GAQL String Query | How to Select Campaign by Campaign ID

2021-07-14 Thread Google Ads API Forum Advisor
Hello, Thanks for reaching out. For this case, you can use the IN operator in place of the '=' operator, as specified in the GAQL grammar. For example: SELECT campaign.id, campaign.name, campaign.vanity_pharma.vanity_pharma_text FROM campaign WHERE campaign.id IN (1234, 2345, 3456) Regards, Ma

Re: GAQL String Query | How to Select Campaign by Campaign ID

2021-07-14 Thread Mat
Hi Reid, that depends on the programming language, you are using. With Python you could do something like this, if you want to use a variable instead of typing the ids manually into the query: campaign_ids_as_string = ', '.join(str(id) for id in campaign_ids) query = ( 'SELECT ' 'cam