[thelist] MS SS7 - SELECT [computed field] syntax question

Luther, Ron Ron.Luther at hp.com
Fri Jan 25 12:34:07 CST 2008


Rudy noted:


>>i think your problem might have been the doublequotes

True, Yeah, thanks!  I found that one pretty early while
experimenting over here.  [MS Query chokes on that and makes
you change it.]


>>also, stay away from IF, use CASE whenever possible

Excellent!!  Thanks!!

I had found the case syntax this morning and got it working for a
single condition.  (Even directly into the row categories in an
Excel pivot table - so that *does* work!)

I was thinking of trying to nest some case statements after lunch.
Mostly because I couldn't find the compound syntax.

>>        , CASE WHEN Field_1 = 'XX'
>>                AND Field_2 = 'YY'
>>               THEN 'New Value'
>>               ELSE Field_3 END     AS New_Field_3


Duh!  Well, Dang.  It always looks simple when you see the right answer, huh?


Thanks Rudy!


Mucho Appreciatavo,
RonL.

(Nope.  I actually bought the 'Grover Park George On Access'
book last year because I have so little experience with Access.
Maybe someday I'll actually read it!)  ;-)



More information about the thelist mailing list