I need help to form a SQL query to retrieve RAW datatype column values from Oracle DB.
I should be able to get the value from the query in String format. If you have come across this kind of scenario, please let me know.
I would like to know how to get this String value in Java.
When Oracle automatically converts RAW or LONG RAW data to and from CHAR data, the binary data is represented in hexadecimal form, with one hexadecimal character representing every four bits of RAW data. For example, one byte of RAW data with bits 11001011 is displayed and entered as CB.
so you are on the right track (I am learning this as I go).
this stack overflow discussion talks about converting text to binary.
string to binary
but of course there is a chance oracle will not let you do an = on a RAW column.
Have you tried that out first just using any rubbish?
I found this on another website: sorry I can't tell you which one as they apparently publish lots of naughty stuff as well.
insert into raw_raw values (1, rawtohex('AAABBB'))
I know it isn't an exact answer but it points out there may be an oracle function to help you?