Hi life forms out there,
in an ACCESS mdb we had a SQL statement like this:
SELECT XAT.*, GWT.GwtText, XLS.XLSGWTNr, XLS.XLSNr, XLS.XLSLosnummer, XLS.XLSText, IIf([XATTyp]=1 Or [XATTyp]=2 Or [XATTyp]=7,[XATFormelergebnis]*[XATmittel],0) AS XATErgebnis, IIf(VarType([XATXBTNr])>1 And [XATXBTNr]<>99999999,'S','') AS ImStamm, IIf(VarType([XATNotiz])>1 And [XATXBTNr]<>99999999,'N','') AS NotizJN
FROM (XAT LEFT JOIN GWT ON XAT.XATGWTNr = GWT.GwtNr) LEFT JOIN XLS ON XAT.XATXLSNr = XLS.XLSNr
WHERE XAT.XATXOTNr = 11
ORDER BY XAT.XATGWTNr, XAT.XATPosNr
It doesn't work in our new ADP project now: "Wrong syntax near '='."
Where is the error? It seems to be in the IIF Function.
Thanx,
Hansjoerg.
in an ACCESS mdb we had a SQL statement like this:
SELECT XAT.*, GWT.GwtText, XLS.XLSGWTNr, XLS.XLSNr, XLS.XLSLosnummer, XLS.XLSText, IIf([XATTyp]=1 Or [XATTyp]=2 Or [XATTyp]=7,[XATFormelergebnis]*[XATmittel],0) AS XATErgebnis, IIf(VarType([XATXBTNr])>1 And [XATXBTNr]<>99999999,'S','') AS ImStamm, IIf(VarType([XATNotiz])>1 And [XATXBTNr]<>99999999,'N','') AS NotizJN
FROM (XAT LEFT JOIN GWT ON XAT.XATGWTNr = GWT.GwtNr) LEFT JOIN XLS ON XAT.XATXLSNr = XLS.XLSNr
WHERE XAT.XATXOTNr = 11
ORDER BY XAT.XATGWTNr, XAT.XATPosNr
It doesn't work in our new ADP project now: "Wrong syntax near '='."
Where is the error? It seems to be in the IIF Function.
Thanx,
Hansjoerg.