Buen dias amigos del foro
Estoy queriendo hacer mas flexible mi función y quiero hacer algo como
esto; anidar select dentro de un bloque case,... es posible hacer esto
begin
return query
case when $1='1' then
select c1,c2 from tabla where c1='ME' and c2='2013'
else
select c1,c2 from tabla where c1='ME'
end;
end;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100
ROWS 1000;
Gracias de antemano
*Felipe Araoz Ramos*
RPM #941990605 / 941990605
RPC 992760385
NXT 822*9500 / 998229500