Home » SQL & PL/SQL » SQL & PL/SQL » converting bytes to human friendly string`
converting bytes to human friendly string` [message #2036] Tue, 18 June 2002 10:01 Go to next message
Laura
Messages: 12
Registered: September 2000
Junior Member
Does anyone know of a function in oracle that will convert bytes into a easily read format?

248,333,200 Byte = 236.8 Megabyte (MB)
2,483,332,004 Byte = 2.3 Gigabyte (GB)

I need to create a "manager-friendly" report on tablespace usage.

Thanks.
Re: converting bytes to human friendly string` [message #2037 is a reply to message #2036] Tue, 18 June 2002 10:36 Go to previous message
K.SREENIVASAN
Messages: 110
Registered: January 2001
Location: banglore
Senior Member
SIR,

SELECT SUM(BYTES)/1024000 FROM DBA_FREE_SPACE;

IT WILL GIVE THE TOTAL FREE SPACE OF THE DATABASE IN MB.

SO YOU CAN USE THIS WAY
SELECT (248,333,200/1024000) FROM DUAL;

IT WILL GIVE THE RESULT IN MB.

K.SREENIVASAN
Previous Topic: Formating/Converting Words to numbers
Next Topic: Re: Error in reading CLOB
Goto Forum:
  


Current Time: Fri Apr 26 20:00:06 CDT 2024