Abracadabra
MIS
When I try to use WHEN IS NULL THEN ...... within a case expression I get the message "incorrect syntax near the keyword IS"
Nulls are checked in the table. The code below worked fine before I added the last CASE expression listed:
CASE [sale or return]
WHEN 'R'
THEN - PI.[Cost of sales]
ELSE PI.[Cost of sales]
END AS cost,
CASE [Ledgering a/c]
WHEN IS NULL
THEN [Cust account no]
ELSE [ledgering a/c]
END AS [ledgering ac]
Many thanks in advance.
Peter M
Nulls are checked in the table. The code below worked fine before I added the last CASE expression listed:
CASE [sale or return]
WHEN 'R'
THEN - PI.[Cost of sales]
ELSE PI.[Cost of sales]
END AS cost,
CASE [Ledgering a/c]
WHEN IS NULL
THEN [Cust account no]
ELSE [ledgering a/c]
END AS [ledgering ac]
Many thanks in advance.
Peter M