Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Export Table to Relative Path
Thu, Sep 14 2017 11:46 AMPermanent Link

Shedden

Hi All,

I would like to run the same SQL file in several different databases for different countries. ( EU, US, DE, etc.). I'm using DBSYS to open a SQL window on the target region database and executing something like this:

Export table if exists CLLDrgs to ".\cllDrgs.csv" with Headers;

instead of a fully qualified path like:

Export table if exists CLLDrgs to "c:\brstlate\casrvyfiles\cllDrgs.csv" with Headers;

If I open dbsys, then a SQL window selecting the target database, the export winds up in.

C:\Program Files (x86)\DBISAM 4 ADD\utils\dbsys\win32

If I open dbsys by clicking on a data table in the target database folder, then open a SQL window, the exports seem to go into the current database folder as expected.

Is there any way to make sure the output goes into the current database folder without using an absolute file path?

Thanks in Advance!
Jim Shedden
Fri, Sep 15 2017 6:56 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Shedden


Its a long time since I looked inside DBSys so I'm guessing here. My thought is that when you open a table DBSys changes the current working directory to the tables directory. When you open an sql window it doesn't. Ideally this will require a mod to DBSys

You could mod DBSys yourself or you could have a range of shortcuts to start DBSys with the starting directory in the shortcut set to your various database directories.

Roy Lambert
Image