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
sudhirn@merunetworks.comsudhirn@merunetworks.com 

Filter product name starting with T using soql

Hi,

  Have written below SOQL to display all product name now i need to add filter to products only start with T has to be retrived. Please suggest me how to add this condition 
 
SELECT Name, Product2.name, Number_of_Nodes__c,UnitPrice,ListPrice,TotalPrice FROM OpportunityLineItem WHERE OpportunityId = '0063400000yU7br'

Tried adding 
Product2.name = 'T%'  but this did not work and not displaying any products

Thanks
Sudhir
Best Answer chosen by sudhirn@merunetworks.com
apex sfdevapex sfdev
SELECT Name, Product2.name, Number_of_Nodes__c,UnitPrice,ListPrice,TotalPrice FROM OpportunityLineItem 
WHERE OpportunityId = '0063400000yU7br' 
AND Product2.name LIKE 'T%'
Try the above SOQL query.
'