I have learned something new today.

Thanks Ben!

Steve Smith

Skadt Information Solutions
Office: (519) 624-4388
GTA:    (416) 606-3885
Fax:    (519) 624-3353
Cell:   (416) 606-3885
Email:  [EMAIL PROTECTED]
Web:    http://www.skadt.com


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ben Johansen
> Sent: September 11, 2002 3:00 PM
> To: Multiple recipients of list witango-talk
> Subject: RE: Witango-Talk: Adding Table A Contents to Table B
> 
> 
> This is possible in some database packages; I have personally done it
> with M$sql and Sybase. You need to include the database name within the
> column reference
> 
> Ie. DatabaseName.TableName.ColumnName
> 
> Example:
> Insert into Database2.TableB select * from Database1.TableA
> 
> Of course this will depend on your DBMS.
> 
> If this is not the case with your DBMS, I would research the
> Export/Import capabilities of your DBMS, because the insert action
> within a loop will be very slow for 1000s of records. 
> 
> You could also do it within a Stored Procedure and place the call within
> the directDBMS action
> 
> Example: call datamove() 
> 
> Just my opinion 
> 
> Ben Johansen - http://www.pcforge.com
> Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
> Latest downloads & List Archives @ http://www.witango.ws
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Steve Smith
> Sent: Wednesday, September 11, 2002 11:36 AM
> To: Multiple recipients of list witango-talk
> Subject: RE: Witango-Talk: Adding Table A Contents to Table B
> 
> I provided the suggestion that I did based on it being two different
> databases. Will "insert into TableB select * from TableA" work accross
> different databases? If it does, great! I always want to learn something
> new
> but I don't think that it will work when two databases are involved.
> 
> Comments?
> 
> Steve Smith
> 
> Skadt Information Solutions
> Office: (519) 624-4388
> GTA:    (416) 606-3885
> Fax:    (519) 624-3353
> Cell:   (416) 606-3885
> Email:  [EMAIL PROTECTED]
> Web:    http://www.skadt.com
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Ben Johansen
> > Sent: September 11, 2002 2:16 PM
> > To: Multiple recipients of list witango-talk
> > Subject: RE: Witango-Talk: Adding Table A Contents to Table B
> >
> >
> > You should use the DirectDBMS Action
> > And do
> > directDBMS1 = "Delete from TableB"
> > directDBMS2 = "insert into TableB select * from TableA"
> >
> > The Insert Action is for a single row of data and looping inserts is
> > very inefficient
> >
> >
> > Ben Johansen - http://www.pcforge.com
> > Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm
> > Latest downloads & List Archives @ http://www.witango.ws
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On Behalf Of Charles Brown
> > Sent: Wednesday, September 11, 2002 11:01 AM
> > 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
> >
> 
> ________________________________________________________________________
> 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
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to