To delete all the records from Table B you could use a delete action with
ID>=1 in the criteria, or you could use a direct DBMS action with DELETE
FROM TableB.

To insert a subset of records from Table A into Table B you can select the
appropriate records from Table A in the first database and store them in a
local scope variable. Then use a FOR loop with an insert action to insert
them into Table B in the second database.

If the tables were in the same database you could use a direct DBMS action
with
INSERT INTO TABLE_B (SELECT * FROM TABLE_A WHERE ...) (syntax may vary and
your auto-incremet field may choke it)
With the tables in different datbases you may be able to create an ODBC
linked table in the first db that points to Table B in the other db. Depends
on your database. Then the statement above will work.

Dave Shelley.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Charles Brown
Sent: Wednesday, September 11, 2002 2:01 PM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: Adding Table A Contents to Table B


How do I add the contents of one table to another table?  I have two
"identical" tables, each in a different data base.  I need to routinely
empty Table B and add the contents of Table A to Table B (actually a
subset of the contents of Table A to Tabnle B).  I think I can empty
Table B by using a selection criteria general enough in the "Delete"
action to catch all the indexed records (e.g., >=1 for the auto
increment index field should catch all the records in the Table). There
is bound to be a simple way to use the "Insert" action to add the
contents of Table A to Table B.  Or not.  Any suggestions will be
greatly appreciated.

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to