Subject Is it possible to convert binary blob to varchar?
Author
Hi,

I tried to convert binary blob field to varchar column in select statement but It did not work.

Here is what I did:

1. I created a domain

CREATE DOMAIN D_BIGVARCHAR AS
 VARCHAR(32000) CHARACTER SET OCTETS
 COLLATE OCTETS;


Then when I use this query

select cast(JOB_INFO as D_BIGVARCHAR) job_string
from JOB_TASKS


I expect to receive the value of blob field as varchar in the result set.


In my java code I use:


rs.getBytes("job_string") to get varchar as byte array.


But for some reason where I have non-char values in the byte array I get (dec)46 instead of actual value.


My Data source in the java is defined with NONE Encoding.


Any ideas what I'm doing wrong?


Thanks in advance


Doychin Bondzhev