Converting Image data type field to readable text

  • Hi,

    We have a vendor application that uses a table with an image data type field to store notes (narrative).  When I do a select * on the table  it returns the task_Id, seq, and the narrative. The narrative is dispalyed as hex representation of the binary data.

    77239 1 0x3D3D3D3D3D3D3D3D3D3D20576564204170722031332030383A30312028

    77239 2 0x3D3D3D3D3D3D3D3D3D3D204D6F6E204170722031382030383A30392028

    What we need to do is to read this table and then insert the rows into another table and convert the image field to readable text so that a reporting group can use the data in a more freindly manner.

    I've searched the various forums and did not find anything, does anyone have a solution or susgestions on accomplishing this?

    Thanks,

    Paul Bork

  • i tried the following

    select CAST(CAST(notes AS varbinary(8000)) AS VARCHAR(8000)) from timage

    first convert to varbinary and then to varchar, probably it will truncate some of the notes[VERIFY].

    for the solution from mars:

    use a front end application (i love vb/vb ,net), with an ocr addin , get the image column and put it into a ocr object and then see if you can play around with it.


    Everything you can imagine is real.

  • CAST(CAST(notes AS varbinary(8000)) AS VARCHAR(8000))

    Works like a charm

     

  • Great Thanks ,  Its working for me also.  Is there anyway convert binary to ntext data. bcoz ntext can store more data than varchar.?

     

    Thanks

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

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