Reputation: 57
Can any one help me for this:
select round(sum(convert(float, size) / 1024 / 1024 / 1024), 2)
There is nothing wrong with the query. The thing here is, I need output as something like 1 GB
like that. Is this possible to get the text 'GB' within the column itself.
Upvotes: 0
Views: 48
Reputation: 862
SELECT CAST(round(sum(convert(float,size)/1024/1024/1024),2) AS VARCHAR(20)) + UPPER('gb') AS [Size]
should do the trick...
Upvotes: 2