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
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks