question about unload
Posted in 1999
Topics: Migration, Import/Export & Data Conversion
hi all: when you do a unload in informix, to a file, is there anyway not to overwrite that file, but just cat to the end of it? thanks a lot. yan
In article <79ahpr$533$1@news.xmission.com>,
"Yan Zhu" <yan.zhu@infinity-insurance.com> wrote:
>
>
> hi all:
> when you do a unload in informix, to a file, is there anyway not to
> overwrite that file, but just cat to the end of it?
> thanks a lot.
> yan
>
>
This method assumes you're on a UNIX system.
First create a named pipe:
mkfifo -m 666 /tmp/NPIPE
Then create a shell script to unload your table as follows:
cat /tmp/NPIPE >> unload_file.unl &
dbaccess my_database - <<!
unload to NPIPE
select * from my_table;!
Make the shell script executable and run it.
This will append to your unload file without growing NPIPE (since it is a
named pipe).
Good luck,
Bob
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own