Retriving image datatype

  • hi,

    I want complete column value in T-SQL, where the datatype is image. I have clob datatype in oracle and i converted the clob datatype to sql server. Now, my problem is i am able to select some part of the column value, but my requirement is to retrive complete value. I written the below SQL to retrieve the data

    select cast(cast(c1 as varbinary(8000))as varchar(8000)) from t1

    But the above query fetches 8000 length data but i have more than that. Any ideas are welcome to read image datatype data.

    Thanks in advance.

    rgds,

    venkat

  • Hi venkat,

    Have a look at the function READTEXT in the SQL help it will explain how to retrieve the image data.

    Its basically a three part operation. 

    Regards

    Richard...

  • Pls follow the link. You will get the code too 🙂

    http://www.winnetmag.com/SQLServer/Article/ArticleID/27520/27520.html

    Thanks,

    Ganesh

  • hi Ganesh,

    I used the same code to retrieve, but the problem is i am unable to view entire text.

    rgds,

    venkat

     

  • What are you using to view it?  Enterprise Manager will not show it all to you.  You will need some kind fo front end tool to view or report on it.

  • Query Analyzer also won't show it to you. SQL Server tools are hopeless when it comes to large binary columns.

    However as a weird trick, open Access, create a linked table to the SQL Server table, auto-create a Form from the linked table, and you should be able to see the data in there.


    Julian Kuiters
    juliankuiters.id.au

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

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