0

Getting Syntax Error( missing operator) in query expression, What am I getting wrong?

SELECT
    ExportUF_NEW.Position, 
    ExportUF_NEW.[User Defined Field 03]
    (CASE
        WHEN ExportUF_NEW.[User Defined Field 03] = OP THEN "Production"
        WHEN ExportUF_NEW.[User Defined Field 03] = STM THEN "Thermal"
        ELSE NULL
    END) AS OperationGroup
FROM ExportUF_NEW
    WHERE (((ExportUF_NEW.[User Defined Field 03]) Is Not Null))

Expect an outcome to new column "OperationGroup" based on ExportUF_NEW[User Defined Field 03].

forpas
  • 160,666
  • 10
  • 38
  • 76
BulkNull
  • 5
  • 2

1 Answers1

0

MS Access did not support CASE WHEN, use switch instead. Similar link: What is the equivalent of Select Case in Access SQL?

Drinkwater
  • 23
  • 1
  • 1
  • 6