SQL CASE statement on EXCEL VBA
T-SQL. DAO, of which the OpenDatabase method is a part, is developed for JET workspaces as well as ODBCDirect workspaces. The default for DAO is a connection to a JET datasource. JET SQL syntax does not support the CASE SQL statement. One alternative would be to use an IIF statement instead. For example: IIF(cd_hist=1, valor, 0)--David Lloyd ...
DA: 40 PA: 80 MOZ Rank: 28