Re:
| From: | Tom Grenier | Date: | Sun, 26 Nov 2000 19:28:33 +0000 |
| Subject: | Re: | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27272@lists.php.net to get a copy of this message | ||
Siim,
I just created two simple, identical tables (no constraints, etc) in Oracle --
loaded some data and tried your statement -- it works great. What database
are you using?
Tom
Siim Einfeldt aka Itpunk wrote:
> INSERT INTO a_main SELECT * FROM main WHERE something='something'
> is it possible in theory? it gives me wrong paramete count error, but at
> the same time the tabels should be identical. Which might cause the
> probleme, is the primary key and auto_increment field in the target table,
> but I changed that, I deleted the primary key line from the a_main and
> deleted the auto_increment atribute from the first line as well. But the
> result is the same. What might be causing the problem?
>
> Yes, possibly I could write it all down like INSERT INTO a_main
> (col1,col2,etc) SELECT col1,col2,etc FROM main, but as I have about 10
> tables and in all of them I have about 20 fields and I need to archive
> them all together with a mouse click....this would just be too painful to
> write it all out.
>
> What are your suggestions?
>
> Thanks
> Siim