Re: [SQL] dinamic sql

2006-08-29 Thread Jaime Casanova
On 8/29/06, Manso Gomez, Ramon <[EMAIL PROTECTED]> wrote: if(user_Input = 'a') l_query := l_query||a_from_clause ||'where ename in '||user_Input else if(user_Input = 'b') l_query := l_query||b_from_clause||'where ename in '||user_Input OPEN csr FOR l_query; l_query := l_query || a_from_claus

[SQL] dinamic sql

2006-08-29 Thread Manso Gomez, Ramon
HiI need to write a Postgres function which executes a cursor. Query of this cursor however is created on the basis of parameters passed by user.if(user_Input = 'a')l_query := l_query||a_from_clause ||'where enameĀ in '||user_Inputelseif(user_Input = 'b')l_query := l_query||b_from_clause||'w