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
Hari.gsHari.gs 

SOQL Query

 

Hi All

 

I have a doubt in soql query. I have given here a sample mysql query. How can it be converted to corresponding soql query?

 

Select Account.BillingState from Account,Contact where Contact.AccountId = Account.id and Contact.Ownerid =: id

 

Thanks and Regards,

Hari G S

Andy BoettcherAndy Boettcher

That would be a Relationship Query.  Read up on it here:

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_relationships.htm

 

-Andy

kiranmutturukiranmutturu

contact obj = [Select Account.BillingState from Contact where AccountId = Account.id and Ownerid =: id];