function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
glen.duncan1.3951499282112769E12glen.duncan1.3951499282112769E12 

SOQL Filter by issue

Hi,

I am new to SOSQL and am having an issue with the following query where no results are returned:

SELECT i.name,
(SELECT Name FROM Line_items__r ORDER BY Name)
FROM Invoice__c i   
WHERE i.Name = 'INV-0004'

If i use a like statement then it works as expected

WHERE i.Name  like  'INV%0004'

Is it possible to use the '-' character in an equals clause in SOQL?
Subhani_SFDCSubhani_SFDC
HI,

Try the below query once

SELECT  Name,
(SELECT Name FROM Line_items__r ORDER BY Name)
FROM Invoice__c
WHERE  Name = 'INV-0004'

Thanks,
Subhani
glen.duncan1.3951499282112769E12glen.duncan1.3951499282112769E12
Hi Subhani,

I tried your suggestion but it still brings back no results.  The query doesn't seem to like the '-' character for some reason. 

Thanks,
Glen