Autor Beitrag
Natti
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 50



BeitragVerfasst: Fr 04.04.08 16:05 
Hallo,

ich habe folgendes Problem. Beim Ausführen der Abfrage:

ausblenden SQL-Anweisung
1:
2:
3:
SELECT Table1.*,(CASE WHEN Table1.TYP=1 THEN 2 ELSE Table1.TYP ENDAS TEST FROM Table1
WHERE Table1.NR='XXX'
ORDER BY TEST


bekomme ich die Fehlermeldung:

Ungültiges Schlüsselwort
Symbol-String: WHEN
Zeilennummer: 1

Bzw. wenn ich IIF-Anweisung nutze:

ausblenden SQL-Anweisung
1:
2:
3:
SELECT Table1.*,IIF(Table1.TYP=1, 2, Table1.TYP) AS TEST FROM Table1
WHERE Table1.NR='XXX'
ORDER BY TEST


Ungültiges Schlüsselwort
Symbol-String: =1
Zeilennummer: 1

Was mache ich falsch?

Moderiert von user profile iconChristian S.: SQL-Tags hinzugefügt
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Fr 04.04.08 16:55 
Welche Datenbank? Unter LocalSQL werden beide Statements nicht unterstützt.
Natti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 50



BeitragVerfasst: Mo 07.04.08 08:45 
Ja, es ist LocalSQL. :cry: