Converting Memory Size

  • Good day Experts,

    I have a column MEMORY size in database with the following rows.

    Memory Size

    171794141184

    How can i convert the number to GB.

    Thank you in advance

  • Assuming that number is Bytes, then divide by (1024*1024*1024)

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • Thanks i figured it out.thats how we learn!

  • Thanks,

    I used cast(cast(b.Memorysize as numeric(20,2))/1024/1024/1024 as numeric(13,2)) as Memory,

    and it gave me 255 which is correct.I want the answer to show GB eg 255GB

  • Thanks i figured it out

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply