Autor Beitrag
Bronstein
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 578
Erhaltene Danke: 1

WIN XP
Delphi 6 / Delphi 2006 / Delphi XE
BeitragVerfasst: Di 04.07.06 07:07 
Hallo,
ich mache eine Abfrage auf eine Access Datenbank mit Hilfe eriner ADOQuery. Die Abfrage funktioniert auch.

Jetzt möchte ich aber einem Feld einen anderen Namen geben. Das geht doch mit ‚AS‘.

Hier mal meine Abfrage:

SELECT tblLogbuch.Type, tblStoerung.Text as Stoerung, tblPerson.Name, tblMaschine.MaschinenID, tblLogbuch.Von, tblLogbuch.Bis, tblLogbuch.aktZeit, tblLogbuch.Stueckzahl, tblLogbuch.Kostenstraeger, tblLogbuch.ServiceVon, tblLogbuch.ServiceBis, tblLogbuch.Sporadisch, tblStoerungskategorie.Text AS Kategorie
From ((((tblLogbuch
LEFT JOIN tblStoerungskategorie on tblLogbuch.StoerKatID = tblStoerungskategorie.StoerKatID)
INNER JOIN tblStoerung on tblLogbuch.tblStoerID = tblStoerung.StoerID)
INNER JOIN tblMaschine on tblLogbuch.M_ID = tblMaschine.M_ID)
INNER JOIN tblPerson on tblLogbuch.PersID = tblPerson.PersID)
;

Jetzt bekomme ich die Daten zwar angezeigt doch mit meinem as Stoerung funktioniert es nicht. In Access funktioniert aber die Namensgebung einer Spalte mit der oben angegebenen Abfrage.
Woran kann das liegen

_________________
Es gibt keine dummen Fragen nur dumme Antworten!!!
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: Di 04.07.06 07:15 
Ich sehe erstmal keinen Fehler aber vielleicht kommt das auch durch die fehlende SQL Formatierung deines Beitrags ;)

Hast du das mal mit einer einfachen Abfrage probiert? Vielleicht unterstützt das Access garnicht?