Ligia Pimentel wrote: > > When we execute this query in psql over linux, we don't get any errors > > select sum(valor) as totalCR, count(correlativo) as docsCR, caja into tmp_cr > from transaccion as t, codigocaja as c > where c.codigo = t. codigo > and c.tipomov = 'CR' > group by caja; > > select sum(valor) as totalDB, count(correlativo) as docsDB, caja into tmp_db > from transaccion t, codigocaja c > where c.codigo = t. codigo > and c.tipomov = 'DB' > group by caja; > > select db.caja, totalcr, totaldb, docsdb, docscr > from tmp_db db, tmp_cr cr > where cr.caja = db.caja; > > But when we execute it on PGAdmin (Windows via ODBC) we get the following > error message: ERROR from backend during clear: 'ERROR: relation_info: > Relation 2300301 not found > > Following is the message in psqlodbc.log, > > conn=57295424, query='drop table tmp_cr; drop table tmp_db; select > sum(valor) as totalCR, count(correlativo) as docsCR, caja into tmp_cr from > transaccion as t, codigocaja as c where c.codigo = t. codigo and c.tipomov = > 'CR' group by caja; select sum(valor) as totalDB, count(correlativo) as > docsDB, caja into tmp_db from transaccion t, codigocaja c where c.codigo = > t. codigo and c.tipomov = 'DB' group by caja; select db.caja, totalcr, > totaldb, docsdb, docscr from tmp_db db, tmp_cr cr where cr.caja = db.caja; ' Seems a chained query is issued. Queries in a chained query are parse and analyzed all together before the chained query's execution. Therefore SELECT couldn't see tables which didn't exist before the execution. regards, Hiroshi Inoue ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster

Reply via email to