How to use case statement this Query.
(select SUM(VPRC_60.receipt_rf_amt) as Before from VPRC_60, VPRC_13 where VPRC_13.proj_adopt>= VPRC_60.dt_for and VPRC_60.receipt_rf_amt <> 0 and VPRC_60.Rpt_unit = VPRC_13.Rpt_unit)
Thanks&Regs
Manavalan
How to use case statement this Query
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jan 13, 2012, 12:07 AM EST
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 15, 2012, 6:12 PM EST
try
for Select..
select case d.condition when 1 then 'Test' else 'test1' end , * from TableName
In where ...
select * from tablename d
where (case d.condition when 1 then 'Test' else 'test1' end) = 'test1'
hope this help.