pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
better way
2+ messages / 2 participants
[nested] [flat]

* better way
@ 2005-05-27 18:28  Lori <lorid@dri.edu>
  0 siblings, 1 reply; 2+ messages in thread

From: Lori @ 2005-05-27 18:28 UTC (permalink / raw)
  To: pgsql-admin

I have a bunch of insert into statements just wondering if anyone knows
of more succinct way of doing multiple
Insert Into mytable(col1,col2,co3 etc) values ('one','two','three');
without repeating the Insert Into ?
thanks
Lori



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

* Re: better way
@ 2005-05-27 19:11  Mark R. Dingee <mark.dingee@cox.net>
  parent: Lori <lorid@dri.edu>
  0 siblings, 0 replies; 2+ messages in thread

From: Mark R. Dingee @ 2005-05-27 19:11 UTC (permalink / raw)
  To: Lori <lorid@dri.edu>; +Cc: pgsql-admin

if your output is from a query do

insert into mytable(col1, col2, col3) 
	(select col_a, col_b, col_c from othertable);

or

use the copy command 

ex.
copy mytable from 'filepath/filename' using delimiters '\t';

you can also use stdin as the input path.

On Friday 27 May 2005 02:28 pm, Lori wrote:
> I have a bunch of insert into statements just wondering if anyone knows
> of more succinct way of doing multiple
> Insert Into mytable(col1,col2,co3 etc) values ('one','two','three');
> without repeating the Insert Into ?
> thanks
> Lori
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



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


end of thread, other threads:[~2005-05-27 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-27 18:28 better way Lori <lorid@dri.edu>
2005-05-27 19:11 ` Mark R. Dingee <mark.dingee@cox.net>

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