Thread View: borland.public.vdbase.data.sql
1 messages
1 total messages
Started by geir.kronkvist
Thu, 17 Feb 2000 00:00
Formatting calculated numbers
Author: 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(*)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads