Member_2_7967487
asked on
Remove special characters
I think using left is more effective:
select *, case when left(CategoryIDs,1) <> '|' then CategoryIDs else substring(CategoryIDs,2,8000) end CategoryIDs2 from Items
Please test this in a DEV environment before running in Production:
UPDATE Items
SET CategoryIDs = SUBSTRING (CategoryIDs ,2, LEN(CategoryIDs)-1)
WHERE LEFT(CategoryIDs,1) = '|'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
orOpen in new window