You need to sign in to do that
Don't have an account?
Harikishore Bandi
How to retrive Opportunity name and Account name where Opportunities are related with Accounts .
Hello:
SELECT Name FROM Opportunity WHERE AccountId IN (SELECT Id FROM Account);
Why its throwing error while I'm including field Account in below query when i was trying to retrive Opportunity name and Account name.
SELECT Name, Account FROM Opportunity WHERE AccountId IN (SELECT Id FROM Account);
SELECT Name FROM Opportunity WHERE AccountId IN (SELECT Id FROM Account);
Why its throwing error while I'm including field Account in below query when i was trying to retrive Opportunity name and Account name.
SELECT Name, Account FROM Opportunity WHERE AccountId IN (SELECT Id FROM Account);
replace Account with Accountid
SELECT Name, Accountid FROM Opportunity WHERE AccountId IN (SELECT Id FROM Account)
Thanks for your reply,
But actually what i needed was not AccountID but the Name of the Account with Which Opportunity is related. For example Consider a unit in Account as "abcAccount" and related Opportunities as i) Opp1 and ii) Opp2. The thing I'm expecting was the output should display as
Name Account Name
----------------------------------------------------------------------------------------------
Opp1 abcAccount
Opp2 abcAccount
Try this:
Hope this helps, Mark as best if it does.
Thanks