Hello,
I got the following query but encounter an exception.
This is the query we have
==================================================
SELECT varchar_column_a FROM table_a, table_b
WHERE varchar_column_a LIKE
'% ' || CAST(CAST(int_column_b AS CHAR(10)) AS VARCHAR(10)) || ' %'
==================================================
As the name stated, what I want to do is to cast an int column as
varchar and act as a string in the LIKE clause.
Follow is the exception throw
==================================================
SQL0132N A LIKE predicate or POSSTR scalar function is not valid
because the first operand is not a string expression or the second
operand is not a string. SQLSTATE=42824
==================================================
Would any pls give me a help on it? Many thanks.
Regards,
kfchu