|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to run the following SQL against my column, Testtbl.Task
I want to replace where the ampersand sign got HTML encoded to "&", and I want to strip it down to only the ampersand sign and delete the "amp" and the ";". It executes, but I still have the HTML encoding for the ampersand sign. USE WI GO EXEC sp_dboption 'WI', 'select into/bulkcopy', 'true' GO DECLARE @ptrval binary(16) SELECT @ptrval = TEXTPTR(Task) FROM Testtbl WHERE Task like '%amp;%' UPDATETEXT Testtbl.Task @ptrval 88 0 '' --Tried this to @ptrval 0 0 '', @prtrval 1 0 '', etc GO EXEC sp_dboption 'WI', 'select into/bulkcopy', 'false' GO |
|
#2
|
|||
|
|||
|
Sorry...line should have been:
UPDATETEXT Testtbl.Task @ptrval 0 8 ...since the start will be at the "amp;" (0), and for each character it's 2 bytes (8), and with saying nothing for the update text, it just deletes the "amp;"...at least that's what books online says, but I'm missing something. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > UpdateText() not working correctly |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|