JSEB
Newb
- Apr 2, 2020
- 13
- 14
I am new to MySQL and I am trying to figure out this problem and I have used every resource I know of.
So basically the code is
And it looks like this:
I need the decimals in the numbers to be rounded upwards to match this:
I have tried using the round() tag but I am getting syntax errors when using that.
I actually just found out a working way to do it:
Following up on this problem, I now have the correct table/information I now need to remove comma's from numbers? I have searched but I do not fully understand?
So basically the code is
SQL:
SELECT EMPLOYEE.EMP_NUM, EMP_LNAME, SUM(ASSIGN_HOURS) AS SumOfASSIGN_HOURS, SUM(ASSIGN_CHARGE) AS SumOfASSIGN_CHARGE
FROM EMPLOYEE, ASSIGNMENT
WHERE EMPLOYEE.EMP_NUM = ASSIGNMENT.EMP_NUM
GROUP BY EMP_NUM
ORDER BY EMP_NUM;
And it looks like this:
You must be registered for see links
I need the decimals in the numbers to be rounded upwards to match this:
You must be registered for see links
I have tried using the round() tag but I am getting syntax errors when using that.
Post automatically merged:
I actually just found out a working way to do it:
SQL:
SELECT ASSIGNMENT.EMP_NUM,
EMPLOYEE.EMP_LNAME,
FORMAT(Sum(ASSIGNMENT.ASSIGN_HOURS),1) AS SumOfASSIGN_HOURS,
FORMAT(Sum(ASSIGNMENT.ASSIGN_CHARGE),2) AS SumOfASSIGN_CHARGE
FROM EMPLOYEE, ASSIGNMENT
WHERE EMPLOYEE.EMP_NUM = ASSIGNMENT.EMP_NUM
GROUP BY ASSIGNMENT.EMP_NUM, EMPLOYEE.EMP_LNAME
Post automatically merged:
Following up on this problem, I now have the correct table/information I now need to remove comma's from numbers? I have searched but I do not fully understand?
You must be registered for see links
Last edited: