Page 1 of 1

Erro Sum com TBCDField

Posted: Tue 29 Aug 2006 14:46
by macario
Olá.

Estou usando Delphi 6, MSSQL2000 e dbexpsda versao 2.50.5.0.

Estou com problemas usando a clausula SUM com campos numeric(12,3)


Exemplo.


select sum(VALOR) as Total from Tabela.


Gera o seguinte erro: "Privileged Instruction".

Grato pela atenção.






:roll:

Posted: Thu 31 Aug 2006 12:40
by Antaeus
Unfortunately we could not reproduce the problem.
Please send us (evgeniyD*crlab*com) a complete small sample to demonstrate
it, including script to create and fill table.

Please post your messages on this forum in English in the future.

Posted: Thu 31 Aug 2006 12:55
by Antaeus
What the result is if you convert value to string on the server using CAST function? For example:

Code: Select all

SELECT CAST(SUM(VALOR) AS VARCHAR(50)) AS Total FROM Tabela