January 29, 2007 at 12:33 pm
I'm wondering if it's possible to nest multiple actions in one case statement. I basically need to do something like:
Select
Case
When LTrim(RTrim(CF_Program_Broker.STD)) = 'F' Then
LTrim(RTrim(CF_Program_Broker.STD)),
Cast(CF_Program_Broker.Promo_Amt as float),
Cast(CF_Program_Broker.Invoice_Price as money),
Cast(CF_Program_Broker.Promo_Amt as money),
Abs(.0000),
END
I'm not sure if this is even possible. but I need a way to change multiple fields based on what this CF_Program_Broker.STD field has for a value.
Thanks,
Ben
January 30, 2007 at 3:23 am
You are trying to return mutliple columns inside your CASE, it is not supported, as per your requirements it is better to use IF ELSE Blocks. You can nest multiple CASE statements but you cannot perform what you have posted.
Prasad Bhogadi
www.inforaise.com
January 30, 2007 at 9:53 pm
You'll need one CASE per column returned... sounds long but runs very fast.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply