Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I need a function to remove slash at the end of the string. for example : If I have 'dd/mm/yyy/', I would like to remove last slash from the string. Please help me if u have any idea.

Thanks
Posted

Try this,

SQL
SELECT LEFT(@String, LEN(@String) - 1)
 
Share this answer
 
Try this,

SQL
SELECT CONVERT(VARCHAR(8),GETDATE(),112) 


The result = '20130620'
 
Share this answer
 
Comments
Member 9861478 20-Jun-13 3:01am    
Hi Andri,

Thank you for your response,,but this is not what I want.. I want to remove only last slash in corrupted data.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900