Append Records From Passthrough Query to Local Table

前端 未结 1 1892
别那么骄傲
别那么骄傲 2021-01-07 02:40

I have an Access Database and I\'m using a pass through query to return records from an AS400 table. The connection string and pass through query work fine, but now I\'m tr

相关标签:
1条回答
  • 2021-01-07 03:30

    You have a pass-through query which works fine and returns the rows you want. Now you want to store those rows in a new local (Jet/ACE) table. Seems to me a simpler approach would be to use the pass-through as the data source in a new "make table" query.

    SELECT * INTO MyNewTable FROM YourPassThruQuery;
    

    Oops, looks like you meant to append those rows to an existing table.

    INSERT INTO MyNewTable
    SELECT * FROM YourPassThruQuery;
    

    If the table structures don't match, you can use field lists for both tables.

    INSERT INTO MyNewTable (fld1, fld2)
    SELECT first_field, second_field FROM YourPassThruQuery;
    
    0 讨论(0)
提交回复
热议问题