Syntax example of an Inset statement where it is selecting values from another table

[email protected]
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <OF46D1B41A.F018FD13-ON86257139.00523B7A-86257139.00530BF1@chs.concentra.corp>
All

I am wondering if anyone has an example of an Inset statement where it is 
selecting values from another table. 

So for example in sql or a stored proc it would look like this

        Insert into table a (column1,
                         column2,
                         column3,
                         column4
        select( column1,
                        column2,
                column3
                column4
        from table b 

But am not sure of the syntax when using DBI
I know when I want to insert a row I can do this, but am not sure of the 
syntax when I want to grab a bunch of rows from one table and insert them 
into another.

$sth=$dbh->prepare(qq{INSERT INTO table b(column1, column2, column3, column4) VALUES (?, ?, ?, ?)}); 

I guess one solution is to loop thru the rows that I get returned via a 
select statement but that seems like a waste of processing time

Any help would be appreciated

Robert Gorrebeeck
Concentra Online Services
972.725.6956
[email protected]
****** CONFIDENTIALITY NOTICE ******
NOTICE: This e-mail message and all attachments transmitted with it may contain legally privileged and confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message from your system. Thank you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.