0

I tried to do like this but couldn't manage to work, looking for help

declare @badStrings table (item varchar(50))

INSERT INTO @badStrings(item)
SELECT '>' UNION ALL
SELECT '<' UNION ALL
SELECT '(' UNION ALL
SELECT ')' UNION ALL
SELECT '!' UNION ALL
SELECT '?' UNION ALL
SELECT '@'

SELECT Replace(u.DisplayName, b.item, '') , * FROM User u, @badStrings b
Mert
  • 6,432
  • 6
  • 32
  • 68
  • 3
    Which dbms product are you using? (Doesn't look like ANSI SQL.) – jarlh Aug 18 '15 at 12:53
  • Are you missing the variable to store the replaced string? `select @clrstr = Replace(u.DisplayName, b.item, '') , * FROM User u, @badStrings b select @clrstr` – Padmanaban Aug 18 '15 at 13:03
  • thanks FutbolFan I could manage to change the code that you gave in link – Mert Aug 18 '15 at 13:14

0 Answers0