Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- General Development
- :
- Re: Issue wiht passing Sting as a query
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Issue wiht passing Sting as a query
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-03-2013 07:57 AM
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
Re: Issue wiht passing Sting as a query
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-03-2013 11:51 PM
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
Re: Issue wiht passing Sting as a query
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-15-2013 06:05 PM

