Remove decimal values using SQL query
Since all your values end with ".00", there will be no rounding issues, this will work
SELECT CAST(columnname AS INT) AS columnname from tablename
SET columnname = CAST(columnname AS INT)
Removing decimals in SQL Query
You can try:
Remove decimal using SQL query
Try with the below script..
cast (100 * Round((sample1 / sample2),2) As int ) as 'Percent'
Remove Decimal from Alphanumeric Field
Use the REPLACE function to replace all decimal points with an empty string ''.
SELECT REPLACE(icd10, '.', '') as icd10 FROM T
SQL Format as of Round off removing decimals
use ROUND () (See examples ) function in sql server
if you don't want the decimal part, you could do
select cast(round(11.6,0) as int)
db2: how to remove the decimal from number column?
casting this value should just work:
select cast(avg(price) as int) as avg_int
where type = 'electric';
How to remove decimal digit from result in mysql?
If you want to round off decimal places, use
If you want to get rid of decimal places, user
So for example
SUM(TIMESTAMPDIFF(MINUTE,Request_Date, Xetr))/60 AS WH
should be changed to
ROUND(SUM(TIMESTAMPDIFF(MINUTE,Request_Date, Xetr))/60,0) AS WH
Edit: This would take care of your
WHEN STATUS = 'PENDING' THEN 1
END) * 100 / count(1),0)
, '%') AS PC
Do the same for all the columns you need to remove decimal places.