Using Format on summarizing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following query:
SELECT Format([price],"0.000000000000000") AS Expr1
FROM table1;
anything works fine !!!
But if i want to calculate the sum of this field with the specific format....
this means...the query becomes:
SELECT Sum(Format([crddebit],"0.000000000000000")) AS Expr1
FROM dbo_logkin;
Then I get the message:
<<The Microsoft Jet database engine could not execute the SQL statement
because it contains a field that has an invalid data type>>
The field price is Number/Double type.
Can't I summarize numbers with 10 or 15 decimal digits ?????
Any help appreciated...
(e-mail address removed)
 
I suspect the problem is you need to apply the format on the sum, rather
than sum the formatted numbers... try:

SELECT Format(Sum([dbo_logkin].[crddebit]),"0.000000000000000") AS Expr1
FROM dbo_logkin;

HTH,
Nikos
 
Nikos Yannacopoulos said:
I suspect the problem is you need to apply the format on the sum, rather
than sum the formatted numbers... try:

SELECT Format(Sum([dbo_logkin].[crddebit]),"0.000000000000000") AS Expr1
FROM dbo_logkin;

HTH,
Nikos
THANKS mate !!!!
It did work :)
 
Back
Top