Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying rows between tables

Status
Not open for further replies.

codecontractor

Programmer
Jan 8, 2005
13
US
I've got two tables with the exact same design. One is remote and one is local and I am trying to mirror the local one with the remote one.

So, I'm checking for new rows and removed rows, but I'm having trouble inserting a whole row when I find one that needs to be added.

I tried creating the sql query from scratch as insert into remote_db values(...), but I want this to be generic and this is getting very time consuming. Anyone know how to simply insert the whole row without having to create the query?

Thanks,
-Ben
 
Sounds to me like one of your fields is an autonumber field and you are trying to put a number in there that it does not want.

You could try an update query appending all but the autonumber using the autonumber as the link field.



Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top