2 messages in com.mysql.lists.mysql-deAntwort: Re: Einer Zelle etwas hinzuf...
FromSent OnAttachments
RICH...@qvc.com19 Jan 2004 02:44 
Alex19 Jan 2004 02:52 
Subject:Antwort: Re: Einer Zelle etwas hinzufügen
From:RICH...@qvc.com (RICH@qvc.com)
Date:01/19/2004 02:44:31 AM
List:com.mysql.lists.mysql-de

dann mach:

UPDATE table SET txt = CONCAT("foobar", txt ) WHERE ...

:)

Gruß,

Richard Stracke

Alex <idioms@freenet. An: "ML MySQL dt.(freenet)"
<mysq@lists.mysql.com> de> Kopie: (Blindkopie: RICHARD
STRACKE/QVCDE) Thema: Re: Einer Zelle etwas
hinzufügen 19.01.2004 11:44

Hartmut Holzgraefe wrote:

Alex wrote:

ist es möglich mit einem befehl einer tabellenzelle die schon daten beinhaltet noch daten hinzuzufügen? wenn ja wie? ein update löscht mir ja den bisherigen inhalt.

CONCAT() hilft

http://www.mysql.com/doc/en/String_functions.html#IDX1174

UPDATE table SET txt = CONCAT(txt, "foobar") WHERE ...

Wie kann ich dem feld txt nun z.B. am anfang etwas hinzufügen?

Bisheriger Inhalt von Feld txt: "Hallo ich bin ein string" mit: UPDATE table SET txt = CONCAT(txt, "foobar") WHERE ... bekomm ich nun "Hallo ich bin ein stringfoobar"

Ich hätte gerne :) "foobarHallo ich bin ein string"

Wie kann ich dies realisieren? Mit einer REGEXP? oder brauche ich eine andere mysql Funktion?

Gruesse Alex