Hello, I need to remove six zeros from the result below from this query. How do i do that?
thanks
SELECT
h.cpuspeed as maxclockspeed,
FROM agent_info a
limit 20
Result: maxclockspeed cloumn = 2500000000
Hello, I need to remove six zeros from the result below from this query. How do i do that?
thanks
SELECT
h.cpuspeed as maxclockspeed,
FROM agent_info a
limit 20
Result: maxclockspeed cloumn = 2500000000
What is the data type of that column?
Does SQL Server support that these days? if not might be MySQL?
tara,
its says bigint(20) if thats what you mean?
Hi Kristen, yes its Mysql.
This is an MS SQL Server forum, so you might not find folk here who know answers to MySQL, or the answers given might only work on SQL Server! Probably worth trying a MySQL forum
If you divide the h.cpuspeed by 1000000 does that give you the answer you want (i.e. scaled down by one million)
It does yes as in 2500.0000 but unsure of how to get rid of the four trailing zeros.
This appears to be a problem with your application as a bigint column will not have decimal places. Format the data to whatever bigint maps to in your application code.