On 10/10/06, adam lawrence <[EMAIL PROTECTED]> wrote:
But now I need to loop through the whole array, not just the one element. I
want to do something like:
FOR j in LOOP
FOR i IN array_lower(arrayvar,1) .. array_upper(arrayvar,1) LOOP
currentvalue:=arrayvar[j][i];
RAISE NOTICE '
HiI want to be able to loop through an array. The code I have used in the past is: FOR i IN array_lower(arrayvar,1) .. array_upper(arrayvar,1) LOOP currentvalue:=arrayvar[1][i]; RAISE NOTICE '%', currentvalue; END LOOP;But now I need to loop through the whole array, not just the one element. I w
Robert Fitzpatrick wrote:
I have a field with 'AA-BB-CC-DD' and I want to pull those four values
into an array and then loop through the array inserting records into a
table for each element. Can you someone point me to an example of this
in pl/pgsql?
Something like this?
create table testfoo
On Thu, Nov 03, 2005 at 06:15:08PM -0500, Robert Fitzpatrick wrote:
> I have a field with 'AA-BB-CC-DD' and I want to pull those four
> values into an array and then loop through the array inserting
> records into a table for each element. Can you someone point me to
> an example of this in pl/pgsq
On Thu, Nov 03, 2005 at 06:15:08PM -0500, Robert Fitzpatrick wrote:
> I have a field with 'AA-BB-CC-DD' and I want to pull those four values
> into an array and then loop through the array inserting records into a
> table for each element. Can you someone point me to an example of this
> in pl/pgsq
I have a field with 'AA-BB-CC-DD' and I want to pull those four values
into an array and then loop through the array inserting records into a
table for each element. Can you someone point me to an example of this
in pl/pgsql?
--
Robert
---(end of broadcast)---