Forum » Programiranje » MYSQL trim
MYSQL trim
BRBR ::
select term, hex(term) from t
where term like ' %'
" kihavka","206B696861766B61"
" kober","206B6F626572"
update t set term = trim(term)
where term like ' %'
Tale zadnji sql nima nobenega učinka na zgornja dva recorda, zakaj ?
where term like ' %'
" kihavka","206B696861766B61"
" kober","206B6F626572"
update t set term = trim(term)
where term like ' %'
Tale zadnji sql nima nobenega učinka na zgornja dva recorda, zakaj ?
Vitamin-B ::
Skripta je OK (meni dela).
Morda imas vklopljen safe update
izklop z ukazom > SET SQL_SAFE_UPDATES = 0;
Morda imas vklopljen safe update
izklop z ukazom > SET SQL_SAFE_UPDATES = 0;
BRBR ::
Ni to.
SHOW VARIABLES LIKE 'sql_safe_updates'
--> OFF
Oboje , tabela in column sta utf8_slovenian_ci ampak to najbrž nima veze.
SHOW VARIABLES LIKE 'sql_safe_updates'
--> OFF
Oboje , tabela in column sta utf8_slovenian_ci ampak to najbrž nima veze.
Zgodovina sprememb…
- spremenil: BRBR ()
BRBR ::
npr, tole ne dela:
update t set term = trim(both ' ' from term)
where term like ' %'
tole pa dela:
update t set term = trim(both UNHEX(20) from term)
where term like ' %'
Kakšen komentar ?
update t set term = trim(both ' ' from term)
where term like ' %'
tole pa dela:
update t set term = trim(both UNHEX(20) from term)
where term like ' %'
Kakšen komentar ?
Zgodovina sprememb…
- spremenil: BRBR ()
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | [MariaDB] Kolikokrat se pojavi tekst v tekstu?Oddelek: Programiranje | 824 (517) | BigWhale |
» | Zanimiv ...hm... problemOddelek: Programska oprema | 2474 (1969) | poweroff |
» | MYsql: Error: Incorrect decimal value: '' for column '' at row -1Oddelek: Programiranje | 637 (562) | Vazelin |
» | Apocalypse Now - the GameOddelek: Igre | 2536 (1810) | oo7 |
» | Kaj za vraga je to RAID?Oddelek: Pomoč in nasveti | 2267 (1932) | krucymucy |