agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Danilo <dbruneli@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Ajuda - insert into select com variavel
Date: Wed, 17 Jan 2018 18:15:36 -0700 (MST)
Message-ID: <1516238136165-0.post@n3.nabble.com> (raw)
Pessoal boa noite, sou novo no mundo Postgres. Conheço bem Oracle mais
Postgres está sendo um novo desafio.
Tenho a seguinte situação:
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ço:
INSERT INTO TAB1
(CAMPO1, CAMPO2, CAMPO3)
SELECT TAB2.CAMPO1, TAB2.CAMPO2, vContador
FROM TAB2
where TAB2.CAMPO3 = 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
view thread (4+ messages) latest in thread
Message-ID: <1516238136165-0.post@n3.nabble.com>
Permalink: ../1516238136165-0.post@n3.nabble.com/
Also on: postgresql.org/message-id/1516238136165-0.post@n3.nabble.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dbruneli@gmail.com
Subject: Re: Ajuda - insert into select com variavel
In-Reply-To: <1516238136165-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox