+ 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.
'