Hi,
You should be able to do something like
INSERT INTO newtable SELECT col1, col2, col3... FROM oldtable;
if the definition of col1, col2, col3... matches the structure of newtable.
If it doesn't, then, you can try
INSERT INTO newtable (newcol1, newcol2, newcol3...) SELECT col1, col2,
col3... FROM oldtable;
Regards
Quentin
-----Original Message-----
From: Lee Jenkins [mailto:[EMAIL PROTECTED]]
Sent: Monday, 22 January 2001 10:40
To: MySQL Mail list
Subject: INSERT INTO Statement
Hi all,
I trying to insert values from one table into another table, but keep
getting an error that the columns don't match. Do I have to select from the
one table in the same order that the columns are in the table I'm trying to
insert into?
Lee Jenkins
General Operations
DataTrak Business Solutions
910-326-4181
mailto: [EMAIL PROTECTED] (Email)
http://www.datatrakpos.com <http://www.datatrakpos.com> (Web)
Questions about EzTouchPOS?
Try our Discussion Board at http://www.datatrakpos.com/discussion
<http://www.datatrakpos.com/discussion>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
The information contained in this email is privileged and confidential
and intended for the addressee only. If you are not the intended
recipient, you are asked to respect that confidentiality and not
disclose, copy or make use of its contents. If received in error
you are asked to destroy this email and contact the sender immediately.
Your assistance is appreciated.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php