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 appreciated. Thanks again, Reid On Tuesday, July 13, 2021 at 7:52:04 AM UTC-5 Pete Lavetsky (AdWords API Guru) wrote: > 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, 2021 at 3:39:22 PM UTC-4 reid.ho...@mediahubww.com > wrote: > >> Hello, >> >> I'm trying to write a string query that returns a few different things-- >> but I would like to filter which campaigns are returned by campaign ID. >> Here's the string query I have wrote so far: >> >> String query = >> "SELECT campaign.id, campaign.name, >> campaign.vanity_pharma.vanity_pharma_text FROM campaign >> WHERE campaign.id 11031113693 >> ORDER BY campaign.id"; >> >> The error says: >> >> Response >> -------- >> Headers: >> Metadata(content-type=application/grpc,request-id=wQ_YJlu7-Ph0bn9VuLHJNg,date=Mon, >> >> 12 Jul 2021 19:30:17 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; >> ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; >> ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; >> ma=2592000,quic=":443"; ma=2592000; v="46,43") >> Body: null >> Failure message: errors { >> error_code { >> query_error: UNEXPECTED_INPUT >> } >> message: "Error in query: unexpected input 11031113693." >> } >> >> >> It worked before I entered the "WHERE" part of the query, but now it >> doesn't seem to be working. Any help you could provide on how to write this >> query would be really appreciated. >> >> Thanks! >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d53219d6-e68c-4d2b-96a1-e4f6fb87a7adn%40googlegroups.com.