2
Answers

How to remove space before a special character in sql

Pinku

Pinku

Oct 11
391
1

I have a string where there is a space before the Special character in between the word sustainability and -energy.
 DECLARE @Title AS VARCHAR(max)='sustainability -energy and power' so I want to make it like 'sustainability-energy and power' .
It should only remove the space before that special character(-). the special character can be any thing.

Answers (2)