Autor Beitrag
Jenns
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Do 11.10.07 02:02 
Hallo,

ich habe folgendes Problem:

ich möchte einen Datensatz innerhalb einer Tabelle kopieren.

Die Tabelle hat die Form
ID, Feld1, Feld2

Kopieren möchte ich mit folgendem SQL-Statement:

ausblenden SQL-Anweisung
1:
insert into Tabelle (select '2', Feld1, Feld2 from Tabelle where ID = '1')					


dabei bekomm ich die Meldung: Merkmal nicht vorhanden

Benutze ich 2 verschieden Tabellen, dann klappt es.

Wo liegt der Fehler? Kann die BDE nicht 2 mal auf die gleiche Tabelle zugreifen?
Gibt es eine andere Möglichkeit, einen Datensatz innerhalb einer Tabelle zu kopieren, wenn ID eindeutig sein muss?

Danke für die Hilfe,

Gruß, Jenns
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Do 11.10.07 08:30 
versuchs mal ohne die Klammern (nur geraten, ich schreibs immer ohne Klammern)

_________________
Bravery calls my name in the sound of the wind in the night...
Jenns Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Do 11.10.07 15:02 
Das ändert leider nichts.

Gruß, Jenns