Re: Question on Formating: displaying $ (dollar) within the query results.
Posted in 1999
On Mon, 8 Feb 1999 robin.cyrus@us.pwcglobal.com wrote: > I have a client who wants to display the following information > > Net Gross > $12,822,699.74 $13,987,857.16 > > from the following query > select sum(net_amt) as Net, sum(grss_amt) as Gross > from sls_fact > where month(cal_dt) = month(today-1) > and year(cal_dt) = year(today-1); > > They currently get > > net gross > 12822654.74 13987857.16 > > ie they want to see the $s and the comma as above. Which product? In DB-Access, you won't get the currency symbol unless the data type of the net_amt column is a MONEY column, and even if you get the currency symbol, there is no way to get the thousands separators into the output. Obviously, if you use another language instead of DB-Access, then you can control the output format better. DB-Access is simply not designed to give you all that much control over the output. You could use an ACE (part of ISQL) report, or an I4GL or D4GL report, or ESQL/C, or ODBC, or ... but you'd program the formatting that you need. Yours, Jonathan Leffler (jleffler@informix.com) #include <wish/I/was/skiing.h> Guardian of DBD::Informix v0.60 (v0.61_02) -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn