Article View: borland.public.vdbase.data.sql
Article #88Formatting calculated numbers
From: geir.kronkvist
Date: Thu, 17 Feb 2000 00:00
Date: Thu, 17 Feb 2000 00:00
17 lines
1117 bytes
1117 bytes
Question: Is it possible to format the numeric result of a query using Paradox table with Borland Database Engine? In the example below, the calculation "TRANS_AMOUNT / COUNT(*)" returns a float value, wheras I would like only 2 decimals. The result set is displayed in a DBGrid in Delphi 2.0. In e.g. Sybase, there is a date format function to use as part of the SQL statement. SELECT MIN(TRANS_DATE), MAX(TRANS_DATE), COUNT(*), TRANS_KATEGORI, KATEGORI_DESCR, SUM(TRANS_AMOUNT) SUM(TRANS_AMOUNT) / (MAX(TRANS_DATE) - MIN(TRANS_DATE) + 1), SUM(TRANS_AMOUNT) / COUNT(*)
Technical Details
Message-ID:
<38ABE15E.CF9AE357@netcom.no>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,94c6a7aeb7ad03dd,start X-Google-Attributes: gidff5a1,public From: "geir.kronkvist@netcom.no" <geir.kronkvist@netcom.no> Subject: Formatting calculated numbers Date: 2000/02/17 Message-ID: <38ABE15E.CF9AE357@netcom.no> X-Deja-AN: 586891451 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.vdbase.data.sql