|
|
|
INSERT INTO TEMP TABLE
|
|||
|---|---|---|---|
|
#18+
Добрый день, помогите разобраться новичку: Код: plsql 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. Если делать SELECT INTO TEMP TABLE в блоке (или в функции), то получаю ошибку:авторОШИБКА: "temp" - не известная переменная LINE 12: TEMP T3 Если каждый statement выполнить отдельно - все ОК Вроде все по доке.... В чем может быть дело? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.07.2015, 10:14 |
|
||
|
INSERT INTO TEMP TABLE
|
|||
|---|---|---|---|
|
#18+
samoxod, потому что select ... into ... в pl/pgsql значит совсем не то что в sql. Используйте insert into t1 select ... -- Maxim Boguk www.postgresql-consulting.ru ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.07.2015, 10:24 |
|
||
|
INSERT INTO TEMP TABLE
|
|||
|---|---|---|---|
|
#18+
Код: sql 1. http://www.postgresql.org/docs/current/static/sql-createtableas.html авторThis command is functionally similar to SELECT INTO, but it is preferred since it is less likely to be confused with other uses of the SELECT INTO syntax. Furthermore, CREATE TABLE AS offers a superset of the functionality offered by SELECT INTO. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.07.2015, 10:31 |
|
||
|
INSERT INTO TEMP TABLE
|
|||
|---|---|---|---|
|
#18+
Maxim Boguk, http://www.postgresql.org/docs/9.4/static/sql-selectinto.html авторnew_table The name (optionally schema-qualified) of the table to be created. Хотелось бы не в заранее созданную таблицу вставить, а создать таблицу "по ходу"... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.07.2015, 10:32 |
|
||
|
|

start [/forum/topic.php?fid=53&tid=1997892]: |
0ms |
get settings: |
7ms |
get forum list: |
20ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
165ms |
get topic data: |
12ms |
get forum data: |
4ms |
get page messages: |
56ms |
get tp. blocked users: |
2ms |
| others: | 216ms |
| total: | 488ms |

| 0 / 0 |
