Subject | Using where params in the select clause |
---|---|
Author | filipm00ns |
Post date | 2005-04-25T18:40:18Z |
Hi,
Is it possible to use your where params in the select clause?
Select
case when AYear = :YEAR1 then AValue else null end as AValue_2004,
case when AYear = :YEAR2 then AValue else null end as AValue_2005
from ATable where AYear in (:YEAR1,:YEAR2)
Works but the results i'm getting are wrong.
Select
case when AYear = 2004 then AValue else null end as AValue_2004,
case when AYear = 2005 then AValue else null end as AValue_2005
from ATable where AYear in (:YEAR1,:YEAR2)
With constants it works.
Greetings,
Filip Moons
Is it possible to use your where params in the select clause?
Select
case when AYear = :YEAR1 then AValue else null end as AValue_2004,
case when AYear = :YEAR2 then AValue else null end as AValue_2005
from ATable where AYear in (:YEAR1,:YEAR2)
Works but the results i'm getting are wrong.
Select
case when AYear = 2004 then AValue else null end as AValue_2004,
case when AYear = 2005 then AValue else null end as AValue_2005
from ATable where AYear in (:YEAR1,:YEAR2)
With constants it works.
Greetings,
Filip Moons