pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SELECT * INTO TABLE is not working for me.
3+ messages / 3 participants
[nested] [flat]

* SELECT * INTO TABLE is not working for me.
@ 2001-05-30 17:02 Roy Souther <roy@silicontao.com>
  2001-05-31 07:54 ` Re: SELECT * INTO TABLE is not working for me. Sergey E. Volkov <sve@raiden.bancorp.ru>
  2001-05-31 10:52 ` Re: SELECT * INTO TABLE is not working for me. Richard Huxton <dev@archonet.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Roy Souther @ 2001-05-30 17:02 UTC (permalink / raw)
  To: pgsql-sql

I am testing my SQL commands in pgaccess before I put them into my C++ code.
Trying to copy a table using...
SELECT * INTO TABLE copy_stuff FROM the_stuff

It creates the view but no table called copy_stuff exists after I run it. Why?
I can use...
CREATE TABLE copy_stuff AS SELECT * FROM the_stuff
that works and makes a new table, but it causes other problems with the 
clients that this app is running from. I would like to make the SELECT * INTO 
work. Any idea?

-- 
Roy Souther <roy@silicontao.com>

01100010 10101110 11000110 11010110 00000100 10110010 10010110 11000110 
01001110 11110110 11001110 00010110 10010110 00101110 10000100 10000100 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: SELECT * INTO TABLE is not working for me.
  2001-05-30 17:02 SELECT * INTO TABLE is not working for me. Roy Souther <roy@silicontao.com>
@ 2001-05-31 07:54 ` Sergey E. Volkov <sve@raiden.bancorp.ru>
  1 sibling, 0 replies; 3+ messages in thread

From: Sergey E. Volkov @ 2001-05-31 07:54 UTC (permalink / raw)
  To: pgsql-sql

"Roy Souther" <roy@silicontao.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:0105301102010Q.28903@OlympusMons...
> I am testing my SQL commands in pgaccess before I put them into my C++
code.
> Trying to copy a table using...
> SELECT * INTO TABLE copy_stuff FROM the_stuff

Works only when 'copy_stuff' table is not exists for now.
If you want to populate existing table, just use ' insert into copy_stuff
select * from the_stuff';

>
> It creates the view but no table called copy_stuff exists after I run it.
Why?
> I can use...
> CREATE TABLE copy_stuff AS SELECT * FROM the_stuff
> that works and makes a new table, but it causes other problems with the
> clients that this app is running from. I would like to make the SELECT *
INTO
> work. Any idea?
>
> --
> Roy Souther <roy@silicontao.com>
>
> 01100010 10101110 11000110 11010110 00000100 10110010 10010110 11000110
> 01001110 11110110 11001110 00010110 10010110 00101110 10000100 10000100
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: SELECT * INTO TABLE is not working for me.
  2001-05-30 17:02 SELECT * INTO TABLE is not working for me. Roy Souther <roy@silicontao.com>
@ 2001-05-31 10:52 ` Richard Huxton <dev@archonet.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Richard Huxton @ 2001-05-31 10:52 UTC (permalink / raw)
  To: Roy Souther <roy@silicontao.com>; pgsql-sql

From: "Roy Souther" <roy@silicontao.com>

> I am testing my SQL commands in pgaccess before I put them into my C++
code.
> Trying to copy a table using...
> SELECT * INTO TABLE copy_stuff FROM the_stuff
>
> It creates the view but no table called copy_stuff exists after I run it.
Why?
> I can use...
> CREATE TABLE copy_stuff AS SELECT * FROM the_stuff
> that works and makes a new table, but it causes other problems with the
> clients that this app is running from. I would like to make the SELECT *
INTO
> work. Any idea?

Works here - can you give version info etc?

richardh=> select * into table foo2 from foo;
SELECT
richardh=> select * from foo2;
 a |                b
---+----------------------------------
 4 | Jack Smith
 5 | Andrea Ottwick
(2 rows)

- Richard Huxton




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-05-31 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-30 17:02 SELECT * INTO TABLE is not working for me. Roy Souther <roy@silicontao.com>
2001-05-31 07:54 ` Sergey E. Volkov <sve@raiden.bancorp.ru>
2001-05-31 10:52 ` Richard Huxton <dev@archonet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox