July 30, 2021 at 8:48 am
I have a DB with a field defined as:
dag_text text allow nulls
I have an hexadecimal value (0x15) placed some hundred places in the table.
It should be replaced with '§' .
In comes REPLACE, but it does not work on text fields.
the offending tekst look like(Its the that should be replaces with '§'
"Helle hjemmedag Vi har snakket 111-handleplan på hjemmedagen: Helle har et ønske om - at gå til folkedans - at gå til vævning - at gå til boccia - at flytte på P i en af de nye lejligheder - ikke at komme på højskole efter Lysbro Disse fem ting kommer med i hendes nye 111-handleplan."
All hints will be appriciated.
Best regards
Edvard Korsbæk
July 30, 2021 at 9:18 am
Had you done a quick Google search, as I did, you should have found this, which seems to do the trick:
https://stackoverflow.com/questions/2641068/sql-server-find-and-replace-in-text-field
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 30, 2021 at 10:02 am
Thanks - Thats usefull including sarcasm.
July 30, 2021 at 10:09 am
Thanks - Thats usefull including sarcasm.
It was intended as a reminder to do some research yourself before posting here and getting other people to do it for you.
As a secondary point, I assume you know that TEXT is a deprecated data type? More information here.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply