Access SQL version of CASE?

Giganews Newsgroups
Subject: Access SQL version of CASE?
Posted by:  philbrierl…@hotmail.com
Date: 22 Aug 2006

What is the easiest way to write SQL that Access understands to achieve
simple standard SQL query below?

Thanks in Advance,

Phil

SELECT

charA,

CASE
WHEN charA < -199 THEN 2
WHEN charA < 31 THEN 3
WHEN charA < 82 THEN 4
WHEN charA < 100 THEN 5
WHEN charA < 105 THEN 6
WHEN charA < 111 THEN 7
WHEN charA < 143 THEN 8
WHEN charA < 165 THEN 9
WHEN charA < 233 THEN 10
WHEN charA >= 233 THEN 11
END AS Bin_charA

FROM X

Replies