select convert ouput value from bytes to GB

HB95

ADSM.ORG Member
Joined
Mar 2, 2016
Messages
10
Reaction score
1
Points
0
PREDATAR Control23

Hi,

For replication report purpose, I found this select :
select node_name, fsname, start_time, end_time,comp_state,BKBYTES_REPLICATED,BKBYTES_TRANSFERRED from replicationview where start_time>=(current_date) order by node_name desc

it's works, but i would like to have value of "BKBYTES_REPLICATED,BKBYTES_TRANSFERRED" from bytes to GB,

i tried to used "1564396029964.png" , but i found some difficult to integrate that on sql , sorry not really well understand how integrate correctly cast on sql command with many tables ?

thanks for helps,
 

Attachments

  • 1564396025839.png
    1564396025839.png
    1.8 KB · Views: 5
PREDATAR Control23

Hi,

I found that i can remove for AVG on cast expression.

select node_name, fsname, start_time, end_time,comp_state,cast(((bkbytes_replicated)/1024/1024/1024)as decimal(18,2)) AS "Replication TOTAL GB" ,cast(((bkbytes_transferred)/1024/1024/1024)as decimal(18,2)) AS "Transferred TOTAL GB" from replicationview where start_time>=(current_date)
 
PREDATAR Control23

question please what is the difference between REPLICATED and TRANSFERRED bytes.?
 
Top