Help with select into
От | Brent Wood |
---|---|
Тема | Help with select into |
Дата | |
Msg-id | 20030304132624.O88690-100000@storm.niwa.co.nz обсуждение исходный текст |
Ответ на | Re: wal-debug (Martijn van Oosterhout <kleptog@svana.org>) |
Ответы |
Re: Help with select into
|
Список | pgsql-general |
The following SQL is a simple join of two tables used to create a view with an integer depth value & explicit centroid assigned to each cell. (Cells are box datatype) This works fine. SELECT chat_cells.cell_id, chat_cells.cell, (@@ chat_cells.cell) AS centre, int4(id_depth.depth) AS depth, chat_cells.substrate FROM chat_cells, id_depth WHERE (chat_cells.cell_id = id_depth.depth_id); What I want to do now is save the data as a table, using select into. The modified query (as I read the docs) should be: SELECT chat_cells.cell_id, chat_cells.cell, (@@ chat_cells.cell) AS centre, int4(id_depth.depth) AS depth, chat_cells.substrate INTO table1 FROM chat_cells, id_depth WHERE (chat_cells.cell_id = id_depth.depth_id); When I run this, I get the error message: PostgreSQL Error Message: ERROR: DECLARE CURSOR must not specify INTO Can anyone tell me what I'm doing wrong & how to select the data into a new table? Thanks, Brent Wood
В списке pgsql-general по дате отправления: