copying rows - Mailing list pgsql-sql

From Walt Bigelow
Subject copying rows
Date
Msg-id Pine.LNX.4.02.9808251530500.9040-100000@alice.stimpy.com
Whole thread Raw
Responses Re: [SQL] copying rows  (Herouth Maoz <herouth@oumail.openu.ac.il>)
List pgsql-sql
I have a table that stores spot info for our tape label system.  I want to
be able to copy all records with a specific librarynumber back into the
same table, but with a different librarynumber.

Something similar to this (which of course does not work)

select into tblspotinfo (librarynumber) values ('6666') select spotnumber,
spottitle, isci, trt, date, timecode from tblspotinfo where librarynumber
= '9988';

Of course it does not like me overloading the select into command like
that.  Is there a simple way to do this that I am just missing?  I just
want to duplicate the data related to librarynumber 9988 and make the new
librarynumber 6666.

Thanks for any insight,
Walt




pgsql-sql by date:

Previous
From: Leslie Mikesell
Date:
Subject: excel vs. money data type?
Next
From: Jose David Martinez Cuevas
Date:
Subject: Once again... triggers