Re: [GENERAL] Need help returning record set from a dynamic sql query

2008-08-13 Thread Gnanavel Shanmugam
Just a thought Why can't you create a temporary table from your dynamic query and use that temp table in the for loop. Thnx, Gnanavel - Original Message - From: "Sathish Duraiswamy" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Cc: "Willy-Bas Loos" <[EMAIL PROTECTE

Re: [GENERAL] Generate a list of (days/hours) between two dates

2005-06-28 Thread Gnanavel Shanmugam
This might be helpful, select current_date + s.t as dates from generate_series(0,5) as s(t); dates 2005-06-28 2005-06-29 2005-06-30 2005-07-01 2005-07-02 2005-07-03 (6 rows) with regards, S.Gnanavel > -Original Message- > From: [EMAIL PROTECTED] > Sent: 27 Jun 20

Re: [GENERAL] Setting all elements in an Bool[] array to the same

2005-06-10 Thread Gnanavel Shanmugam
try this, test=# select array(select 1 from generate_series(0,array_upper('{1,2,3,4,5}'::int[],1))); ?column? --- {1,1,1,1,1,1} (1 row) test=# select array(select true from generate_series(0,array_upper('{1,2,3,4,5}'::int[],1))); ?column? --- {t,t,t,t,t,t} (1 row