copying rows

From: Walt Bigelow <walt(at)stimpy(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: copying rows
Date: 1998-08-25 22:38:45
Message-ID: Pine.LNX.4.02.9808251530500.9040-100000@alice.stimpy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jose David Martinez Cuevas 1998-08-25 23:52:48 Once again... triggers
Previous Message Leslie Mikesell 1998-08-25 21:55:41 excel vs. money data type?