+ Start a Discussion
Ajitkumar Pradhan 9Ajitkumar Pradhan 9 

Select id,AccountId,Account_Company_Id__c,JobDiva_ID__c from Opportunity where JobDiva_ID__c!=null AND Stage==Open

What's wrong in this query?
Best Answer chosen by Ajitkumar Pradhan 9
RamakantRamakant
Hi Ajitkumar,

Please change ypur query as below:
Select id,AccountId,Account_Company_Id__c,JobDiva_ID__c, StageName  from Opportunity where JobDiva_ID__c != null AND StageName ='Open'
PLease mark as best answer if helped.

Regards,
Ramakant

All Answers

Vinod ChoudharyVinod Choudhary
Hi,

What Error you are getting ?

try this:

Select id,AccountId,Account_Company_Id__c,JobDiva_ID__c from Opportunity where JobDiva_ID__c!=null AND Stage='Open'

or
String stage = 'Open';
Select id,AccountId,Account_Company_Id__c,JobDiva_ID__c from Opportunity where JobDiva_ID__c!=null AND Stage=:stage

Hope this will help you :)

Thanks
Vinod
RamakantRamakant
Hi Ajitkumar,

Please change ypur query as below:
Select id,AccountId,Account_Company_Id__c,JobDiva_ID__c, StageName  from Opportunity where JobDiva_ID__c != null AND StageName ='Open'
PLease mark as best answer if helped.

Regards,
Ramakant
This was selected as the best answer
Ajitkumar Pradhan 9Ajitkumar Pradhan 9
Thanks. I got that correct.