Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread How to convert text in a Blob column to a Clob column?
Thu, Apr 9 2015 1:05 PMPermanent Link

Barry

I have a table that has a BLOB column called FileContentsBinary but it contains only text. I'd like to modify the table so it has a FileContentsText column that is a CLOB column and contains the text stored in FileContentsBinary.

I can't find any way to covert the text in the Blob column to the Clob column without it turning into binary gibberish.

I can use EDBMgr to display the rows and open any of the FileContentsBinary cell values and export it to a text file and it is readable. I can also access the text from FileContentsBinary in Delphi XE2 just fine so I know I can write a Delphi app to do the conversion. But how can I do it using SQL in EDBMgr?

If I execute

Select Cast(FileContentsBinary as Clob) from table Files;

it displays binary gibberish and not text.

TIA

Barry

EDB 2.13B2 Unicode.
Thu, Apr 9 2015 4:00 PMPermanent Link

Barry

I ended up writing a small Delphi procedure with TEDBTable to do the conversion. It took me 5 minutes.

As far as SQL is concerned, from what's I've seen so far, "Once a Blob, always a Blob". Smile

Barry
Image