Try the following:
INSERT INTO archives SELECT '1', A.*, <timestamp> FROM
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Brian Piotrowski
Sent: Monday, March 24, 2008 10:55 AM
To: Midrange Systems Technical Discussion
Subject: SQL Statement Help
Good Morning All,
I'm having a brain cramp this morning and hope that someone can give
me a hand with an SQL statement. I have done it in the past, but the
for the life of me can't remember how I did it.timestamp.
I have two tables that has a set of fields in it. At the end of the
day, I want to run a routine that will move said data to an archives
table and append some additional data to it - a plant code and a
So my LIVETABLE table structure is:
And my ARCHIVES table is defined as:
So in effect, when I move the data from the live table to the
archives table, I want to do something like this:
INSERT INTO archives ('1', select * from LIVETABLE, <timestamp>)
Where the first field is a static column and the last will be a
Assistant Mgr. - I.T.
Simcoe Parts Service, Inc.
Ph: 705-435-7814 x343
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
If you have received this email in error please notify the systemmanager.
Please note that any views or opinions presented in this email arethe company.
solely those of the author and do not necessarily represent those of
Finally, the recipient should check this email and any attachments
for the presence of viruses. The company accepts no liability for any
damage caused by any virus transmitted by this email.--
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date:
3/23/2008 6:50 PM
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please
take a moment to review the archives at