Toon posts:

[MySQL / OracleSQL] Spaties uit string halen

Pagina: 1
Acties:
  • 265 views sinds 30-01-2008
  • Reageer

Verwijderd

Topicstarter
bestaat er een functie om een spatie uit een woord te halen? net zoiets als LTRIM ofzo maar dan voor in het woord? dus niet in PHP ofzo maar in SQL ??? Zodat je met bv. een UPDATE SET de woorden van een spatie kan ontdoen...

  • thomaske
  • Registratie: Juni 2000
  • Laatst online: 14-07 14:28

thomaske

» » » » » »

RTFM!!

code:
1
2
3
4
5
6
7
REPLACE(str,from_str,to_str) 
Returns the string str with all all occurrences of the 
string from_str replaced by the string to_str: 
mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww');
        -> 'WwWwWw.mysql.com'

This function is multi-byte safe.

Brusselmans: "Continuïteit bestaat niet, tenzij in zinloze vorm. Iets wat continu is, is obsessief, dus ziekelijk, dus oninteressant, dus zinloos."