function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
hegde_hegdekhegde_hegdek 

SQL query to get contact owner id from oppurtunity

Hello Friends,

I am new to salesforce object model

is there a sql query to get the contact onwer id from opputunity,please can any one provide me this query.

regards

hegdek

prageethprageeth

Hello hegde_hegdek;

 

What do you mean by "ContactOwner"?

There is no field named "contact" in Opportunity table. 

 

Could you please supply more info??? 

 

Edwin VijayEdwin Vijay

Hi ... Hope this is what you are trying to do

 

 

Account newacc = [ Select AccountId from Opportunity]; [ Select OwnerId from Contact where AccountId=:newacc.AccountId]

 

 Always use the WSDL to get the exact table level defenitions of all objects.. You can get it from Develop --> API --> Enterprise WSDL

 

Cheers