Long tablenames
Posted in 1994
In response to ------
>>One simple problem:
>> I want to export a database on (SCO) UNIX and import this
>> database with I-SQL DOS !
>> The dbexport on UNIX generates to long filenames, so i can4t use
>> the SQL-Script and the unload files.
[stuff deleted]
Jack Parker wrote:
:Try this:
:{tabren.ace}
:database xxxxxx end
:
:output
:top margin 0
:bottom margin 0
:page length 1
:end
:
:select tabname from systables where tabid > 99
:end
:
:format
:
:on every row
: print "mv ", tabname clipped, ".unl ", tabname[1,8], ".unl"
:end
:--- end ---
:
:I can't remember offhand what the unix extension of the unload files, but
:thats easy to fix. This will generate a script to rename all of the files
:for you. If you run it as sacego -q you wont even have to mess with the
:headers
:
:j.
Jack, I take off my hat to you! If there are awards for clever solutions
on this list, then you're my nominee for the gold. This solution has what I
regard as the hallmarks of good programming - simplicity and elegance.
Like all good ideas, it's so simple it requires a genius to think of them.
** Opinions expressed are my own and not necessarily those of my employer
=========================================================================
Barry Toomey Phone +353-1-2822333
AT&T Network Systems Ireland Fax +353-1-2822864
Corke Abbey Avenue, email: bt@irl3b2c.att.com
Bray, uunet: att!irl3b2c!bt
Co. Dublin
Ireland
=========================================================================