While converting the below DML from SQL Server to DB2, I am getting
Error 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.
Both the columns expr and logical name are VARCHAR data types. I am able
to select both sides of the LIKE predicate independently.
DELETE from test
where (replace(' ' || upper(expr) || ' ',
replace(replace((replace(upper(expr),
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', ' ')
|| '=' ), '''', ''),' ',''),' '))
like '% ' || upper(logical_name) || ' %';
I tired CASTing and CHAR function, but did not help. What am I missing
here.
We are on DB2 for LUW V8.2
Thanks & Regards,
Divakar
Confidentiality Notice
The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [Email address protected] immediately
and destroy all copies of this message and any attachments.
DB2 & UDB email list listserv db2-l LazyDBA home page