Hi friends,
I want know that , How to get names having '_' at the and of names in the tables. and remove the '_' from the names having '_' at the ends of names in the table. like deepak_ to deepak. ?
Thanks
SQL Server Query
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 18, 2011, 8:30 PM EST
Try this...
For knowing (_) in records in a table.
SELECT sname FROM student WHERE (sname LIKE '%|_%%' ESCAPE '|')
For removing (_) in records in a table.
UPDATE student SET sname = REPLACE(sname, '_', '')
Thanks
Deepak DwijRank #348 · 7.2K reputationPosted Nov 18, 2011, 11:59 PM EST
This is the solution i m looking for.
Thanks