Skip to content
Advertisement

Reading BLOB column in oracle table

I have a table tbl which has below columns:

When I run below query it works fine:

But when I run below it throws error:

I mean to say, if I select only 1 blob column to read , then date filter works fine. But when I select both BLOB columns with date filter in where clause, it throws below error:

Advertisement

Answer

This simple means (as the exception suggest) that in the column ColLB contains not a valid value for the decompression.

The test shows that is is most probably a column with a NULL value – see script below.

Note that if you have stored a non NULL value that is corrupted (i.e. not in a compressed format) you would see a different exception

So as a workaround you should protect your expression with a CASE statment testing for NULL

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement