Greetings,
I have a place in a query where I would like to use CASE to key off of one value, and then in each case set multiple fields.
Is that possible using a single case, or must I use a separate CASE for each field to be set and always refer to the one field that indicates which CASE is true?
Air Code:
Is something like that possible, or does it take separate CASE statements to set each variable?
I have a place in a query where I would like to use CASE to key off of one value, and then in each case set multiple fields.
Is that possible using a single case, or must I use a separate CASE for each field to be set and always refer to the one field that indicates which CASE is true?
Air Code:
Code:
CASE ProductLine
WHEN 'R' THEN ColA = 'Road', ColB = 5
WHEN 'M' THEN ColA = 'Mountain', ColB = 6
WHEN 'T' THEN ColA = 'Touring', ColB = 7
WHEN 'S' THEN ColA = 'Other sale items', ColB = 8
ELSE ColA = 'Not for sale', ColB = 0
END