You need to sign in to do that
Don't have an account?

Querying opportunites
Development Language: Java
Salesforce API: 3.0
I am having a problem getting a query to return any values. I have tried all of the following, where is my field list, but they all have a return of 0 records:
* select from Opportunity where StageName like '%Purchased%' or Type like '%renewal%'
* select from Opportunity where StageName like 'Purchased' or Type like 'renewal'
* select from Opportunity where Type like '%renewal%'
* select from Opportunity where Type like 'renewal'
I have also tried each of these with the specified fieldnames in the where-clause alll-caps.
I know that objects exist out there, but the query doesn't return them... I am therefore forced to remove the where-clause which returns all Opportunities vs. a little more than half.
Thanks in advance.
Jason Rogers
Salesforce API: 3.0
I am having a problem getting a query to return any values. I have tried all of the following, where is my field list, but they all have a return of 0 records:
* select from Opportunity where StageName like '%Purchased%' or Type like '%renewal%'
* select from Opportunity where StageName like 'Purchased' or Type like 'renewal'
* select from Opportunity where Type like '%renewal%'
* select from Opportunity where Type like 'renewal'
I have also tried each of these with the specified fieldnames in the where-clause alll-caps.
I know that objects exist out there, but the query doesn't return them... I am therefore forced to remove the where-clause which returns all Opportunities vs. a little more than half.
Thanks in advance.
Jason Rogers
Message Edited by JasonRogers on 06-29-2004 01:05 PM
Hi JasonRogers,
The StageName field is a picklist. A picklist field does not support the like operator. This is due to the way the data is stored in the database. We are working on resolving this issue for the Winter '04 release.
Wish I had better news for you.