elección entre varias select

diegutico
01 de Septiembre del 2009
Hola a todos!

Soy novato en estos temas de SQL... y tengo la siguiente pregunta:

Necesito seleccionar unos datos en función de si se cumple una condición o no (un IF-ELSE, vamos....). Estoy trabajando sobre Oracle y me tengo el siguiente código:

if dta_inizio = \'2009\' then
if strretrib.IMP_RAL = 0 then
select * from strretrib where dta_inizio = 2008
elsif
select * from strretrib where dta_inizio = 2009
end if;
end if;

Muchas Gracias a todos!!!!