Re: Urgent
Posted in 2000
Sarah Jessica wrote:
>
> Hi,
> 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.
How about:
SELECT SUM(amount), COUNT(*)
FROM employee
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |What year 2000 bug? year 2000 bug? |/// / ////|
| |year 2000 bug? year 2000 bug? year |// / /////|
| |2000 bug? year 2000 bug? year 1900 |/ ////////|
+----------------------+-----------------------------------+-----------+