If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I guessed that the question was came from the added statement in DB2 V9.

IBM&#174; DB2 Universal Database™ SQL Reference Volume 1 Version 8.2

CLOB ( character-string-expression[, integer] )

The schema is SYSIBM.

The CLOB function returns a CLOB representation of a character string type.
In a Unicode database, if a supplied argument is a graphic string,
it is first converted to a character string before the function is executed.

character-string-expression
An expression that returns a value that is a character string.

...

DB2 Version 9 for Linux, UNIX, and Windows SQL Reference Volume 1

...

character-string-expression
An expression that returns a value that is a character string.
The expression cannot be a character string defined as FOR BIT DATA (SQLSTATE 42846).

my query is like select clob($some_entry) from schema.table where some_condition.earliar we used this query in 9.1.5 where it is working fine.now while executing the same command in 9.2.4 it is giving the following error.
SQL0461N "A value with data type "SYSIBM.VARCHAR FOR BIT DATA" cannot be cast to type "SYSIBM.CLOB" SQLSTATE=42846

The error is clear: you have binary data and try to interpret it as textual/character data. That's typically not a good idea because character data has code pages associated and that implies conversions if, for example, DB2 stores the data in Unicode while your application uses EBCDIC. You have a very good chance that you get garbage data.

So I would argue that 9.1.5 had a bug by not preventing such a cast and this problem is fixed in 9.2.4.

You may consider casting the VARCHAR FOR BIT DATA binary data to a BLOB (binary LOB) instead.