Re: Urgent
Posted in 2000
Topics: Migration, Import/Export & Data Conversion
From: "Sarah Jessica" <sarah_jessica@hotmail.com>
>
>I am unloading the data into the test.dat. How can I have the header and
>trailer that having the record count and the total amount.
>
>The Employee table is like this:
>eno smallint
>ename char(20)
>amount money(14,2)
>
>Now when I use the unload command like this
>unload to "/home/sarah/test.dat" delimiter "|"
> select * from employee;>
>This will only unload all the records; but not have any header or trailer
>showing that; this is having so many records and total amount.
>Hope the group will comeout with positive response.
Nope. UNLOAD by itself won't do that. But you can try something like:
unload to "/home/sarah/test.dat" delimiter "|"
select count(*), sum(amount) from employee;
unload to pipe "cat >> /home/sarah/test.dat" delimiter "|"
select * from employee;
unload to pipe "cat >> /home/sarah/test.dat" delimiter "|"
select count(*), sum(amount) from employee;
I haven't got the foggiest if this will work or not. :-)
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
unload to pipe
This unload facility is not in Informix 8.21 XPS.But I tried with the awk/shell scripts and it worked.
Thanks Group.
* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful