I just want to get the value of one table \"b\" if table \"a\" value is \"-\" If the value at table \"b\" is empty then get the value of table \"a\" even if it\'s \"-\"
MS Access does not support CASE
statements. Use IIF
:
IIF(tsl.activitat <> '', tsl.activitat, ts.activitat ) AS Activitat
I'm not sure if Access supports aliases on LEFT JOIN
either, but it probably does
Note (although correctly tagged), the title of your question might be troublesome... most people refer to Transact-SQL (TSQL) when writing "MS SQL". Transact-SQL is used by MS SQL Server, but not by MS Access, which uses its own SQL dialect (called "Access SQL", and pretty limited in comparison)