ich vier Tabellen zu verbinden versuchen, und ich erhalte die Fehlermeldung ‚Syntaxfehler in Ausdruck Join‘MS Access 2007 SQL-Syntax-Fehler in Join-Ausdruck
finden Sie unterhalb der Abfrage, die ich derzeit versuche
zu schreibenSELECT a.*,
switch(a.[Start Date] between b.[SEASON1START] and b.[SEASON1END],b.[LRA_S1_RT1_SGL],
a.[Start Date] between c.[SEASON1START] and c.[SEASON1END],c.[LRA_S1_RT1_SGL],
a.[Start Date] between d.[SEASON1START] and d.[SEASON1END],d.[LRA_S1_RT1_SGL]) as [Negotiated Rate Local],
switch(a.[Start Date] between b.[SEASON1START] and b.[SEASON1END],
b.[RATE_CURR],a.[Start Date] between c.[SEASON1START] and c.[SEASON1END],c.[RATE_CURR],
a.[Start Date] between d.[SEASON1START] and d.[SEASON1END],d.[RATE_CURR]) as [Negotiated Currency]
FROM ((([Q1001 - Split Transactions] a
left join [2014 Negotiated Rate] b on (a.[RX_ID] = b.[PROPCODE] And YEAR(a.[Start Date] = 2014))
left join [2015 Negotiated Rate] c on (a.[RX_ID] = c.[PROPCODE] And YEAR(a.[Start Date] = 2015))
left join [2016 Negotiated Rate] d on (a.[RX_ID] = d.[PROPCODE] And YEAR(a.[Start Date] = 2016)) ;
Danke für die Antwort, aber ich bekomme immer noch den gleichen Fehler, auch nach dem Ersetzen des Codes nach Ihrem Vorschlag. –
"Wechseln zu einer besseren Datenbank" zu ehrlich :) – onedaywhen
@AyanMukherje. . . Ich dachte, eine Unterabfrage würde es tun. Vielleicht ist eine Sicht erforderlich. –