[GENERAL] Looping through Arrays

2006-10-11 Thread adam lawrence
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

Re: [GENERAL] brain-teaser with CONSTRAINT - any SQL experts?

2005-10-09 Thread Adam Lawrence
book" with the same "isbn" that also has different name, if it did your function could raise an error message. I realise you said you actually wanted to put the constraint on the table, but I just thought I would suggest this anyway. Cheers Adam Adam Lawrence Mediasculpt Direct Lin

[GENERAL] Trying to append text to the end of a text string

2005-10-05 Thread Adam Lawrence
Hi   I am trying to append text onto the end of a text variable.   I have the text variable P_IDT_ID, I want to add the letter S to the end of it, so I tried the following line in my code:   P_IDT_ID := P_IDT_ID && cast(''S'' as text);   However, I got the following error message:   ERROR: