Skip to main content
 i am trying to join orders with account and contract.

 

this works 

 

SELECT name, AccountId, contractid    FROM order 

 

but this shows ID's only.  If i want to join the account and contract table, I do this.

 

SELECT name,AccountId, contract.id  contract.name,   account.name FROM order

 

and get this error message

 

[ERROR:]MALFORMED_QUERY:

 

contract.name, account.name FROM

 

^

 

ERROR at Row:1:Column:70

 

unexpected token: '<EOF>'ssage

 

 
3 answers
  1. Sep 29, 2015, 6:09 PM
    good catch.  but it still blows up.

     

    when i do this,

     

    SELECT name, AccountId, contractid , contract.name,   account.name FROM order    

     

    i get this error msg.

     

    [ERROR:]INVALID_FIELD:

     

    SELECT name,AccountId, contractid , contract.name, account.name FROM order

     

    ^

     

    ERROR at Row:1:Column:37

     

    No such column 'name' on entity 'Contract'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

     

    and i do see a field "name" in contract.
0/9000