Hi was wondering if somebody could help on this one.
I have a table called LocalisationText and a field called "ResourceText".After localization bad data went into the ResourceText field (double and triple quotes instead of singles).
EG
Entrada ""{0}"" en ubicacion """"{1}"""""
在或大 ""{0}"" 的命令出
User Post Code Group of Type ""{0}"" is ""{1}""
Now I have been asked to write a script that
converts all the double/triple quotes preceding {number} with single quotes .
The above corrected should look like
Entrada "{0}" en ubicacion "{1}"
在或大 "{0}" 的命令出
User Post Code Group of Type "{0}" is "{1}"
Can you help

Cannot figure out how to write this script?
nevilledubash
Hi there
thanks for your reply.
The column in question is an nvarchar 512.
I will look into patindex function .
Do you have a quick example how I could do it
thanks
John Stolwerk
msx86
ocmega
Or you can do your update in a loop and additionally include required criteria
SELECT top 1 * FROM LocalisationText
WHILE @@ROWCOUNT > 0
BEGIN
UPDATE LocalisationText_Test
SET ResourceText = REPLACE(ResourceText,'''''','''')
WHERE ResourceText LIKE '%''''{[0-9]%'
OR ResourceText LIKE '%[0-9]}''''%'
END
GO
HuskyNET
set @s = N'Entrada ""{0}"" en ubicacion """"{1}"""""
在或大 ""{0}"" 的命令出
User Post Code Group of Type ""{0}"" is ""{1}""
'
print replace(replace(replace(@s, '""', '"'), '""', '"'), '""', '"')
Bo Jangeborg
thanks a lot for your reply that worked!!!!!!!
thanks again