Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Best way.
Sun, Apr 15 2012 4:03 AMPermanent Link

Abdulaziz Al-Jasser

Hi,

I am currently migrating a DBISAM 3 application to EDB.  Now I am facing some problem migrating a code that will export some data from table to an external table located on a certain directory and then importing this table on another site.  So the question, what is the best way to export partial data from a table to an external table/file and importing it later?
Regards,
Abdulaziz Jasser
Sun, Apr 15 2012 6:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz


The two approaches to check out are EXPORT and PUBLISH. I think from the brief description given EXPORT/IMPORT will be your best choice. You'll need to create a view to export from but that's easy.

If its a regular thing and just encompasses updates then PUBLISH would be the way to go.

Roy Lambert [Team Elevate]
Wed, Apr 18 2012 12:32 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Abdulaziz,

<< I am currently migrating a DBISAM 3 application to EDB.  Now I am facing
some problem migrating a code that will export some data from table to an
external table located on a certain directory and then importing this table
on another site.  So the question, what is the best way to export partial
data from a table to an external table/file and importing it later? >>

If you have direct access to the destination table from within EDB, then
something like this will work fine:

CREATE TABLE MyDestinationTable AS
SELECT * FROM MySourceDatabase.MySourceTable WHERE....
WITH DATA

The key here is to make sure that a database is defined for the target
directory (in addition to the source database).  Then, you would run an SQL
statement similar to the above from within the context of this target
database.

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, May 23 2012 5:07 AMPermanent Link

Abdulaziz Al-Jasser

Roy, Tim

Thanks for the replies and sorry for my late reply.  I think I will go with EXPORT/IMPORT since I will be exporting the data to another database located on a different machine.  Therefore, I will do the export like this:

1- Create a store.
2- Create a view with data need to be exported.
3- Export the view to the store.
4- Drop the view.
5- Drop the store but with KEEP CONTENTS.

And then for the import:

1- Create a store and but the exported data in it.
2- Import the data from the store.
3- Drop the store.

Please comment.
Regards,
Abdulaziz Jasser
Wed, May 23 2012 5:39 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz


I do something similar and it looks reasonable to me. If you're going to be reusing it I'd just leave the view and store alone just delete the data once its imported.

The only other thing you may need to consider, depending on what the data is, is encryption.

Roy Lambert [Team Elevate]
Image