On Wed, 28 Aug 2002 20:07:51 +0200, "Carsten Højgaard"
<nospam_carsten@hojgard.dk> wrote:
>Hej NG
>
>Er det muligt i MySQL at opdele en streng ud fra et bestemt tegn fx.
>mellemrum?
>
>Fx. kunne strengen være 'Erik Petersen'. Kan man få MySQL i dette tilfælde
>til at returnere 'Erik' og 'Petersen' opdelt?
Hmmm Umiddelbart kan jeg kun komme i tanke om (fra manualen):
SUBSTRING_INDEX(str,delim,count)
Returns the substring from string str before count occurrences of the
delimiter delim. If count is positive, everything to the left of the
final delimiter (counting from the left) is returned. If count is
negative, everything to the right of the final delimiter (counting
from the right) is returned.
hth
/wulff
|