sustainability- energy
sustainability. energy
sustainability/ energy
sustainability; energy
sustainability* energy
sustainability: energy
sustainability, energy
sustainability energy
select * from Title where TitleDescription like '%sustainability energy%'
.So if i run above query its getting the last record only but i need all
Muhammad Imran AnsariPosted Oct 8, 2024, 12:35 PM
Hi Pinku,
To retrieve all the variations of the phrase “sustainability energy” in your data, you need to mention the punctuation between the words. Since SQL Server’s LIKE operator does not treat punctuation as equivalent to a space, you'll need to include all possible punctuation marks that could appear between “sustainability” and “energy.”
You can try the below query:
Thank you.
Muhammad Imran AnsariPosted Oct 8, 2024, 1:30 PM
If you want to get all without punctuations then you can use a combination of REPLACE functions to remove specific punctuation characters from the TitleDescription field.
PinkuPosted Oct 8, 2024, 12:56 PM
Thanks Imran its working.But i have another query.
sustainability- energy
sustainability. energy
sustainability/ energy
sustainability; energy
sustainability* energy
sustainability: energy
sustainability, energy
sustainability energy
lets say there are some data like above. and i want to show all of this but with out Punctuation like below . how to do it.
sustainability energy
sustainability energy
sustainability energy
sustainability energy
sustainability energy
sustainability energy
Rohit Kumar SrivastavaPosted Oct 8, 2024, 12:28 PM
Hi you can use _ like below.
select * from Title where TitleDescription like '%sustainability_energy%'
hope it will help you.