Hello,

I just ran the GetCampaigns.java file successfully, and now I want to add a 
row to the GAQL query-- VanityPharmaText 
<https://developers.google.com/google-ads/api/rest/reference/rest/v6/customers.campaigns#vanitypharmatext>

*Here's the String query I have:*

private void runExample(GoogleAdsClient googleAdsClient, long customerId) {
  try (GoogleAdsServiceClient googleAdsServiceClient =
  googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
String query = "SELECT campaign.id, campaign.name, 
campaign.vanity_pharma.vanity_pharma_text, FROM campaign ORDER BY 
campaign.id";

*It's returning this error:*

Failure message: errors {

  error_code {

    query_error: BAD_FIELD_NAME

  }

  message: "Error in SELECT clause: invalid field name \'FROM\'."

}

request_id: "xRpoPouoBilEUsq8qsD4Fg"


Status: Status{code=INVALID_ARGUMENT, description=Request contains an 
invalid argument., cause=null}.

Request ID xRpoPouoBilEUsq8qsD4Fg failed due to GoogleAdsException. 
Underlying errors:

  Error 0: error_code {

  query_error: BAD_FIELD_NAME

}

message: "Error in SELECT clause: invalid field name \'FROM\'."

___________________________________________________________________________

What is the correct way to write this? Thank you in advance for the help!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/47ae416b-c055-4015-a5f9-b586955e7820n%40googlegroups.com.
  • correct syntax f... 'reid hommedahl' via AdWords API and Google Ads API Forum

Reply via email to