Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecB9v-0006Pt-Dp for pgsql-sql@arkaria.postgresql.org; Thu, 18 Jan 2018 14:27:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecB9t-0000gm-PJ for pgsql-sql@arkaria.postgresql.org; Thu, 18 Jan 2018 14:27:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ebyns-00059A-TM for pgsql-sql@lists.postgresql.org; Thu, 18 Jan 2018 01:15:41 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ebynp-0005EZ-PL for pgsql-sql@postgresql.org; Thu, 18 Jan 2018 01:15:39 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 29121AB10F42 for ; Wed, 17 Jan 2018 18:15:36 -0700 (MST) Date: Wed, 17 Jan 2018 18:15:36 -0700 (MST) From: Danilo To: pgsql-sql@postgresql.org Message-ID: <1516238136165-0.post@n3.nabble.com> Subject: Ajuda - insert into select com variavel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pessoal boa noite, sou novo no mundo Postgres. Conhe=C3=A7o bem Oracle mais Postgres est=C3=A1 sendo um novo desafio. Tenho a seguinte situa=C3=A7=C3=A3o: Tenho uma procedure onde existe uma variavel chamanda vContador do tipo int= . Abaixo vou exemplificar alterado o nome da tabela e campos para poder facilitar. quando fa=C3=A7o: INSERT INTO TAB1 (CAMPO1, CAMPO2, CAMPO3) SELECT TAB2.CAMPO1, TAB2.CAMPO2, vContador FROM TAB2=20 where TAB2.CAMPO3 =3D 1 O Sistema apresenta erro de column "vContador" does not exists Alguem por favor pode me ajudar? -- Sent from: http://www.postgresql-archive.org/PostgreSQL-sql-f2142323.html