agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Iuri Sampaio <iuri.sampaio@gmail.com>
To: Danilo <dbruneli@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Ajuda - insert into select com variavel
Date: Thu, 18 Jan 2018 14:01:27 -0300
Message-ID: <E9786426-4A1F-4E78-8D85-F133C149A8D4@gmail.com> (raw)
In-Reply-To: <1516238136165-0.post@n3.nabble.com>
References: <1516238136165-0.post@n3.nabble.com>
Para quem entende de Oracle, siga os mesmos conceitos. Na tabela tab2 não ha existe a coluna vContador. Adicione-a.
ALTER TABLE tab2 ADD COLUMN vContador int;
> On Jan 17, 2018, at 22:15, Danilo <dbruneli@gmail.com> wrote:
>
> 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: <E9786426-4A1F-4E78-8D85-F133C149A8D4@gmail.com>
Permalink: ../E9786426-4A1F-4E78-8D85-F133C149A8D4@gmail.com/
Also on: postgresql.org/message-id/E9786426-4A1F-4E78-8D85-F133C149A8D4@gmail.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: iuri.sampaio@gmail.com, dbruneli@gmail.com
Subject: Re: Ajuda - insert into select com variavel
In-Reply-To: <E9786426-4A1F-4E78-8D85-F133C149A8D4@gmail.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