Re: select into without creating new table

Поиск
Список
Период
Сортировка
От Ian Harding
Тема Re: select into without creating new table
Дата
Msg-id sdb3a608.062@mail.tpchd.org
обсуждение исходный текст
Ответ на select into without creating new table  ("Paul" <nomail@nomail.com>)
Список pgsql-general
insert into oldtable (col1, col2) select colx, coly from othertable

Ian A. Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
(253) 798-3549
iharding@tpchd.org

>>> "Paul" <nomail@nomail.com> 10/18/02 04:44AM >>>
Hi,

How can I select data from table into an existing table. I've redesigned
some tables and thus want my data to be copied from the old table to the new
one. Since the column order, names (and the number of columns) is not equal
i thought of using:

select column1,column2 into newtable from oldtable

THis however leads to an error that states that the table exists already.
Deleting the table is no option for me since I want the data to be in the
table with the new structure.

Any help would be appreciated!




-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


В списке pgsql-general по дате отправления:

Предыдущее
От: "Patrick Fiche"
Дата:
Сообщение: Re: select into without creating new table
Следующее
От: "Erwan DUROSELLE"
Дата:
Сообщение: Rép. : pgAdmin II connection problem