Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UVOrR-0000SQ-ER for pgsql-sql@arkaria.postgresql.org; Thu, 25 Apr 2013 16:17:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UVOrQ-0004my-Uv for pgsql-sql@arkaria.postgresql.org; Thu, 25 Apr 2013 16:17:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UVOrQ-0004me-83 for pgsql-sql@postgresql.org; Thu, 25 Apr 2013 16:17:28 +0000 Received: from smtp44.kinghost.net ([189.38.82.44]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UVOrD-0001N2-7S for pgsql-sql@postgresql.org; Thu, 25 Apr 2013 16:17:27 +0000 Received: from smtp-gw-01.kinghost.net (smtp-gw-01 [127.0.0.1]) by smtp44.kinghost.net (Postfix) with ESMTP id C6573C93E6; Thu, 25 Apr 2013 13:17:08 -0300 (BRT) Received: from sygecom.com.br (unknown [10.5.5.60]) by smtp-gw-01.kinghost.net (Postfix) with ESMTPA id C165359804615 for ; Thu, 25 Apr 2013 13:17:06 -0300 (BRT) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_6a77c70a957aebb2b1e260c80e6dbe2a" Date: Thu, 25 Apr 2013 13:17:06 -0300 From: Mauricio Cruz To: Subject: execute Organization: Sygecom Message-ID: <38dac89ce680b4e50ba69e2851cb6f60@sygecom.com.br> X-Sender: cruz@sygecom.com.br User-Agent: RoundCube Webmail/0.4 X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org --=_6a77c70a957aebb2b1e260c80e6dbe2a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi every one, =20 I'm trying to do the follow:=20 declare =20 aCad text[][]=20 begin=20 ...=20 execute 'aCad:=3DaCad array[['||var1||','||var2||']]'=20 ...=20 end; language plpgsql but I get the follow error: =20 sintax erro near to "aCad"=20 aCad :=3D aCad || array[rCad.cmp,rSql.codfor] =20 ^=20 I guess I should not use "execute" besides of insert, update, delete ... but how could I do in this case ? Thanks every one.=20 --=20 Grato, Mauricio Cruz Sygecom Inform=C3=A1tica [1] 51 3442-3975 / 3442-2345=20 =20 Links: ------ [1] http://www.sygecom.com.br --=_6a77c70a957aebb2b1e260c80e6dbe2a Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

Hi every one, 

 

I'm trying to do the follow:

 

declare 

   aCad text[][]

begin

...

execute 'aCad:=3DaCad array[['||var1||','||var2||']]'

...

end; language plpgsql

but I get the follow error: 

sintax erro near to "aCad"

aCad :=3D aCad || array[rCad.cmp,rSql.codfor]  

^

 

I guess I should not use "execute" besides of  insert, update, dele= te ...  but how could I do in this case ?

 

Thanks every one.

 

--=20
Grato,
Mauricio Cruz
Sygecom Informática
51 3442-3975 / 3442-2345 
--=_6a77c70a957aebb2b1e260c80e6dbe2a--