You need to sign in to do that
Don't have an account?
Suresh Raghuram
Issue wiht passing Sting as a query
Hi Community,
I am passing string as a query
String query = 'SELECT ID,Principal_Owner__c, StageName, Last_Campaign_Before_Close__c from opportunity where Id =\'006E00000056kIw\'';
The above part is working fine .
The problem is when i add the below part it is working .
//and StageName LIKE \'+Closed%\'';
Colud any suggest me where iam doing wrong
Hi,
Can you please write your whole query string.
I guess according to this post in your and part i.e. "and StageName LIKE \'+Closed%\''" here you are using Closed as variable and you had appended the "%" at the end of closed. What I will suggest you to try query in below way.
String stageName = "Closed%";
String query = 'SELECT ID,Principal_Owner__c, StageName, Last_Campaign_Before_Close__c from opportunity where Id =\'006E00000056kIw\' and StageName LIKE :stageName ';
Regards,
Purushottam
Purushottam Bhaigade Software Developer, Screen-Magic
purushottambhaigade@gmail.com | www.screen-magic.com
Contact me: purushottam8688