Hi all

        I have created a query, I can use dbtype="query".
        I can do the loop:
                <CFLOOP Query="Table2Query">
                        <CFQUERY name="" datasource="MyDs">
                                INSERT INTO table1(column1, column2,
column3)
                                Values (Table2Query.column1,...)
                        </CFQUERY>
                </CFLOOP>

        I am trying not to loop over my query for this insert.

        in SQL you can do:
                INSERT INTO  Table1
                        SELECT column1, column2, column3
                        FROM Table2

        and insert records from table2 into table1

        How can I do this with <CFQUERY>?

        <CFQUERY name="" >
                INSER INTO table1
                SELECT column1, column2, column3
                        FROM Table2Query
        </CFQUERY>

        table1 needs the datasource
        table2 is QoQ

        Is this possible?

Thanks
Rodney

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294966
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to