![]() |
Using Case in MSquery
Is there a way to use case functionality in MSQuery like in tsql.
Example Select Job, Case trantype when 1 then amount when 2 then amount *-1 end as Amt from tblJob |
Using Case in MSquery
Try this:
Select Job, (amount*CHOOSE(trantype,1 ,-1)) AS Amt from tblJob Does that help? *********** Regards, Ron XL2002, WinXP-Pro "LBIdydys" wrote: Is there a way to use case functionality in MSQuery like in tsql. Example Select Job, Case trantype when 1 then amount when 2 then amount *-1 end as Amt from tblJob |
All times are GMT +1. The time now is 05:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com