Autor Beitrag
Hänsel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 152



BeitragVerfasst: So 22.01.12 23:54 
Hallo wer kann helfen ?

Bei dem Versuch die folgende Select-Anweisung zu strarten, bekomme ich eine Fehlermneldung.
ausblenden SQL-Anweisung
1:
2:
3:
Select * into [test.txt] IN  'c:\' 'Text;'
from
MGV2


Was habe ich hier falsch gemacht?

Hänsel

Moderiert von user profile iconMartok: SQL-Tags hinzugefügt
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mo 23.01.12 05:06 
user profile iconHänsel hat folgendes geschrieben Zum zitierten Posting springen:
Was habe ich hier falsch gemacht?

Die Fehlermeldung nicht genannt?

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
Hänsel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 152



BeitragVerfasst: Mo 23.01.12 06:50 
folgende Fehlermeldung:

Falsche Syntax in der Nähe des "IN"- Schlüsselwortes
Tranx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 648
Erhaltene Danke: 85

WIN 2000, WIN XP
D5 Prof
BeitragVerfasst: Mo 23.01.12 07:14 
Schau doch mal hier nach:

www.gitta.info/RelQu...elfAssessment10.html


Vielleicht setzt Du den Text nach IN in Klammern, außerdem ist es sinniger, das from hinter Select * direkt zu setzen, da es dazugehört. Du schreibst ja auch nicht "Das Haus in der Staße xy welches mir gehört und dessen Fenster", sondern : "Die Fenster meines Hauses in der Straße xy" :

ausblenden Delphi-Quelltext
1:
Select * from MGV2 into [test.txt] IN  ('c:\' 'Text;')					


Allerdings verstehe ich ehrlich gesagt den IN-Konstrukt nicht ganz. Was soll der denn eingrenzen? Werte in Feldern? Dann muss doch auch das Feld genannt werden, in dem die Werte stehen, und das steht da definitiv nicht. Oder Inhalte in der Datenbank allgemein?

_________________
Toleranz ist eine Grundvoraussetzung für das Leben.
Hänsel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 152



BeitragVerfasst: Mo 23.01.12 16:20 
Hier kommt follgende Fehlermeldung:

Falsche Syntax in der Nähe des "INTO"- Schlüsselwortes.
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mo 23.01.12 16:39 
Die Syntax ist ja auch eine ganz andere.

ausblenden SQL-Anweisung
1:
2:
3:
Select *
into [Text;HDR=YES;DATABASE=C:\Test\].test.txt
from MGV2


Ja, auch bei MS wird das mit SELECT .. INTO .. IN beschrieben, aber jede gute Doku zeichnet sich dadurch aus, dass sie nicht zutrifft :P

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
Hänsel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 152



BeitragVerfasst: Di 24.01.12 19:11 
Die jetzt angezeigte Fehlermeldung ist schon etwas genauer: .....Datenbank nicht vorhanden. Aber es soll ja nur eine Textdatei erzeugt werden. Wie nun weiter?