filesize and stringsize

  • Hi,

    I have a csv file whose size I get using
    sp_OAGetProperty @Filenum, 'Size', @filSize OUT
    just for example if the content of the csv file is     'data1,data2,data3,data4,data5'    and for this suppose I get size as  1KB

    Now when I do
    SELECT SUM(DATALENGTH('data1,data2,data3,data4,data5'))       ( or even by dividing by  1048 )
    why I dont get the size of this string same as above size i.e., 1KB?

    or is there any kind of relation between 2 sizes...
    if csv file size for some content is 2 KB , the using datalength('samecontent') it will be 1 KB  (i.e, 2 KB : 1KB  and when its 3KB for file, we get 2KB for same content using datalength)?

    How can I get both their sizes as same... or if that is not possible, how to get the relationship formula between them?


    Best
    -P

Viewing 0 posts

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