Saving a Recordset as a table

Results 1 to 2 of 2

Thread: Saving a Recordset as a table

  1. #1
    Dezzi Guest

    Default Saving a Recordset as a table

    I have a recordset with 2 fields. (Item, Cost) and about 2500 records. I need to update a table which already exists in an MS-ACCESS DB with the contents of this recordset (The table has the same structure - Item, Cost fields).<BR><BR>The best method I&#039ve can think of are<BR>1). Use GetRows to obtain an Array and then loop through the array using SQL UPDATE/INSERT commands to update the Access table<BR><BR>This takes a while for 2500 records and I&#039m wondering if anyone knows a faster way to do it. <BR><BR>(I can even delete the MS-ACCESS table and recreate it if required)<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Saving a Recordset as a table

    If you delete the table, you could do something like this...<BR><BR>SELECT * INTO tablename<BR>FROM existingtable<BR><BR><BR>If you just want to insert the records into the table, try...<BR><BR>INSERT INTO tablename<BR>SELECT *<BR>FROM existingtable<BR><BR><BR>HTH<BR><BR>Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts