i was wondering how to copy a table to another table within the same Microsoft Access Database? "Less work more network" (HP) -- its so catchy
Easiest way would be to go into Access, right click on the table, choose copy, and then right click again in the same window, and choose paste....
Otherwise, look into using a CREATE TABLE SQL statement, and then opening up the table you want to copy, and going line by line adding the existing records to the new table --
thanks, but i was wondering how to do it using ASP, i will look into the SQL create table, but will that create a new table each time, because i want to append the data...? "Less work more network" (HP) -- its so catchy
OH! Yes, CREATE TABLE will create a new table each time.
Here's what you can do if all you want is to add new stuff to the other table...
Both tables would obviously have the same PK.
Create a recordset with table1
Create a recordset with table2
set 'on error resume next' so that no errors are returned --
loop through rs1 and add all values to rs2 until the eof of rs1 -- do a batch update...
It will not add any records that are already there, because your your primary key constraint, but it will add the records that aren't there... but because you turned error catching off, you get no error messages, and there ya go!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.