Is it possible to sum on a cast??
Printable View
Is it possible to sum on a cast??
On 1 Nov., 12:04, jacko <jkings...@cityofnorthport.com> wrote:[color=blue]
> Is it possible to sum on a cast??[/color]
You mean something like this?
Select Cast(Sum(MyCol) as Dec(15, 5))[color=blue]
>From MyTable;[/color]
Or
Select Cast(Sum(Cast(MyCol as Integer) as Dec(11,2))
Form MyTable;
Birgitta
jacko wrote:[color=blue]
> Is it possible to sum on a cast??[/color]
Of course.
The SQL reference indicates that the argument for the
SUM column function is 'numeric-expression'. The CAST
scalar function returns a numeric expression.