can there any built in function
jawad ashfaq, January 11, 2016 - 2:03 pm UTC
can there any built in function
January 12, 2016 - 12:32 am UTC
no there is not a (supported) one
num2displaysize
Laurent Schneider, January 11, 2016 - 2:13 pm UTC
select dbms_rcvman.Num2DisplaySize(2000000) from dual ;
1.91M
Unfortunately, it's an internal undocumented package
1024 or 1000
Laurent Schneider, January 13, 2016 - 12:01 pm UTC
Depending if you want to have 1K=1000 or 1K=1024 you could use
round(n/power(1024,trunc(log(1024,n))),1)||substr(' KMGTPEZY',trunc(log(1024,n))+1,1)
or
round(n/power(1000,trunc(log(1000,n))),1)||substr(' KMGTPEZY',trunc(log(1000,n))+1,1)