Group: Forum Members
Posts: 5,
Visits: 17
|
If i execute the subselect alone, i get the following result
+---------------------+ | nbabovetime | total | +---------------------+ | 21912 | 27061 | +---------------------+
and if i try to extract the percentage with a outer select
SELECT nbabovetime,total, CAST(ROUND(100.0 * (nbabovetime / total), 2) AS DECIMAL) as Percent FROM( SELECT sum(isrequestabovetime) as nbabovetime , count(*) as total FROM ( SELECT CASE WHEN time-taken > 1000 THEN 1 ELSE 0 END AS isrequestabovetime,cs-uri FROM CurrentView WHERE cs-uri LIKE '%/suite/webapi/%' ) );
i get the Error in ROUND: 100.0 is not a valid value for Double.
Trying different other notations for 100.0 (100,0 or 100 since in Belgium we use different characters to separate decimals) gives
Function ROUND expects parameter 0 to be of type System.Decimal.
|