MySQL Forums
Forum List  »  German

Anfängerfrage bzgl. Insert ... Select
Posted by: Liesl Weppen
Date: December 16, 2011 08:30AM

Hallo zusammen,

ich bin noch ziemlich unfit in SQL und habe folgendes Problem:

Ich möchte aus einer Tabelle bestimmte Felder vom Typ String auswählen, den Inhalt dieser Felder dann mit einem Suffix versehen und in die gleiche Tabelle einfügen.
So sehen bisher meine Versuche aus, die immer kläglich scheitern:

INSERT INTO TAB1 (FELD1) VALUES (CONCAT(FELD1,'123')) SELECT TAB1.FELD1 FROM TAB1 WHERE FELD1 like 'ABC%';

Mir schwant, daß der Fehler darin liegen könnte, daß ich in einem Befehl aus der gleichen Tabelle lesen und schreiben möchte.

Ich bin für Eure Hilfe dankbar.

Options: ReplyQuote


Subject
Views
Written By
Posted
Anfängerfrage bzgl. Insert ... Select
1924
December 16, 2011 08:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.