On Thu, Jun 26, 2014 at 11:07 AM, AJ Weber <aweber@xxxxxxxxxxx> wrote:
I will try this, but can you clarify the syntax? I only know the VALUES clause from insert statements, and it would be one set of parens like VALUES('175769', '175771', ... )
That is for multiple columns, mine is for multiple rows (and it also work on INSERT to insert many rows at once).
The result would be:
WHERE node_id in
VALUES(('175769'), ('175771'), ('175781'), ('175825'), ('175881'), ('175893'), ('175919'), ('175932'), ('175963'), ('175999'), ('176022'), ('176079'), ('176099'), ('176115'), ('176118'), ('176171'), ('176181'), ('176217'), ('176220'), ('176243'), ('176283'), ('176312'), ('176326'), ('176335'), ('176377'), ('176441'), ('176444'), ('176475'), ('176530'), ('176570'), ('176623'), ('176674'), ('176701'), ('176730'), ('176748'), ('176763'), ('176771'), ('176808'), ('176836'), ('176851'), ('176864'), ('176881'), ('176929'), ('176945'), ('176947'), ('176960'), ('177006'), ('177039'), ('177079'), ('177131'), ('177144'))
WHERE node_id in
VALUES(('175769'), ('175771'), ('175781'), ('175825'), ('175881'), ('175893'), ('175919'), ('175932'), ('175963'), ('175999'), ('176022'), ('176079'), ('176099'), ('176115'), ('176118'), ('176171'), ('176181'), ('176217'), ('176220'), ('176243'), ('176283'), ('176312'), ('176326'), ('176335'), ('176377'), ('176441'), ('176444'), ('176475'), ('176530'), ('176570'), ('176623'), ('176674'), ('176701'), ('176730'), ('176748'), ('176763'), ('176771'), ('176808'), ('176836'), ('176851'), ('176864'), ('176881'), ('176929'), ('176945'), ('176947'), ('176960'), ('177006'), ('177039'), ('177079'), ('177131'), ('177144'))
You seem to indicate a VALUES clause that has strange parenthesis corresponding to it.
No, nothing strange, you are just not aware of the syntax. See [1], and a more clear example (for INSERT) at [2], look for "To insert multiple rows using the multirow VALUES syntax:".
[1] http://www.postgresql.org/docs/current/static/sql-values.html
[2] http://www.postgresql.org/docs/current/static/sql-insert.html#AEN78471
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres