Asking for example code for ROUND() function HSQLDB

Hi, I’m trying to round the values from a field in which I have salaries, so I want to use the ROUND function. However I am getting a syntax error. Due there are some minor differences between SQL and HSQLDB, it seems that I am doing something wrong.

This is my code:

SELECT “Nombre”, “Apellido1ero”, “SalarioBruto_EUR”

ROUND (“SalarioBruto_EUR”, 0) AS “SalarioRedondeado”

FROM “tbl_EMPLEADOS”

It produce a SQL Error 1000, Syntax error.

The fields are in Spanish, but are easy to understand Nombre (Name), Apellido1ero (FirstName), SalarioBruto_EUR (GrossSalary_EUR)

What I want is to round the values of SalarioBruto_EUR and show these values rounded as SalarioRedondeado, however I am getting the syntax error.
Due there are differences between SQL and HSQLDB, I’d really appreciate your help to let me know what am I typing wrong

Cheers

You are using the ROUND statement exactly right. I think the problem is that you need a comma at the end of the first line. SQL is insistent on commas between columns, and the ROUND AS statement functions as another column.

(if this answered your question, please accept the answer with the check(image description) to the left)

Doug buddy, you are absolutely right. A SINGLE COMMA! you are right, I’m sorry did not see it. Thanks a lot.

Delete this answer as it’s not an answer ! You can always comment to answers in your questions.