Autor Beitrag
Nightfly
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 163



BeitragVerfasst: Mo 06.10.03 10:08 
egal ob ich
ausblenden Quelltext
1:
Select * from Main ORDER BY 'bezeichnung'					

oder
Select * from Main ORDER BY 'Key' verwende,wenn ich die Query auf active setze wird die Tabelle angezeigt, ohne das da irgendwas sortiert ist. Die Felder existieren,wenn ich sie anders schreibe kommt ne Fehlermeldung. Wenn ich bloß einzelne Felder selektiere geht das auch,also wird die Anfrage auch abgearbeitet.

Achja, es handelt sich um eine ADS TAbelle, version 7.0.
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mo 06.10.03 10:10 
Setz den Feldnamen hinter ORDER BY mal nicht in Anführungszeichen, sonst wird das als String gewertet und nach was soll er dann sortieren?
Nightfly Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 163



BeitragVerfasst: Mo 06.10.03 10:17 
:oops:
Nightfly Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 163



BeitragVerfasst: Mo 06.10.03 10:24 
Jetzt weiß ich auch wieder warum ich die anführungszeichen dort hatte: Wenn ich's ohne mach wie du sagst geht das bei allen Feldern, außer beim Feld KEY. Sieht wohl so aus als is das ein Schlüsselwort oder sowas, gibts ne möglichkeit das der das trotzdem als Feldname schluckt?

Ansonsten kommt bei folgender abfrage:
ausblenden Quelltext
1:
Select * from Main ORDER BY key					


folgender Fehler: Expected lexical element not found: identifier or expression

Achja
ausblenden Quelltext
1:
Select * from Main ORDER BY main.key					
geht genausowenig :(
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mo 06.10.03 10:30 
Hallo,

versuche einmal das Feld Key in eckige Klammern zu setzen:

ausblenden Quelltext
1:
Select * from Main ORDER BY [key]					

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
Nightfly Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 163



BeitragVerfasst: Mo 06.10.03 10:30 
Recht schönen dank, so geht's.