select statement in GB's
2002-03-18 14:43:33
Hello,
I'm not a SQL-guru, and that's why I like some help with the following
statement.
I made the following statement:
select SUM(A2.total_mb) as "MB_Backup_WinNT" from nodes A1, auditocc A2
where A1.node_name=A2.node_name AND A1.platform_name='WinNT'
The output of the query is:
MB_Backup_WinNT
---------------
86653
86653
I will do this for every platform. Now I like to get the results in GB's.
I try several statements in different ways, but it is giving me every time
the same answer, namely: 84.00, but the answer should be 86653/1024=84.62.
Tried the following statements:
select SUM(A2.backup_mb)/1024 as "MB_Backup_WinNT" from nodes A1, auditocc
A2 where A1.node_name=A2.node_name AND A1.platform_name='WinNT'
select cast(SUM(A2.backup_mb)/1024 as decimal(8,2))as "MB_Backup_WinNT" from
nodes A1, auditocc A2 where A1.node_name=A2.node_name AND
A1.platform_name='WinNT'
Is there some SQL-guru out there, who can give me the tip to get my results
in GB's round in right way and two decimals ?
Thank you very much.
Brian
_________________________________________________________________
Download MSN Explorer gratis van http://explorer.msn.nl/intl.asp.
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- select statement in GB's,
brian welsh <=
|
|
|