Issue when rounding numbers in SQL query

Hello everyone,

I’m trying to create a SQL query which includes a round function so I include the next sentence:
ROUND(d_v.cvss_score,1) as “CVSS Score”,
then I validate the query without any problem but when I run it, after some minutes, the report fails.

However, if I add the sentence like this without the number of decimals that I want to show I have no problem:
ROUND(d_v.cvss_score) as “CVSS Score”,
but of course I’m not showing any decimals and I’m just rounding to the closest integer.

So, do you know why this is not working? or do you know how to get a field only showing 2 decimals?

Thanks! Best Regards,
Nacho

CAST (d_v.cvss_score AS DECIMAL (10,2)

you probably don’t actually need ten spaces in front of the decimal, I just always use that as my default. But the 2 after the comma specifies 2 decimal places.

It worked! Thank you very much John!