Is there an English language description for what this code fragment is
trying to accomplish?
A general observation is that REPLACE can return a CLOB if one of the
arguments is a CLOB or a LONG VARCHAR.
-----Original Message-----
From: divakar
[mailto:db2udbdba-ezmlmshield-x86768757.[Email address protected]
Sent: 30 November 2005 05:19
To: LazyDBA Discussion
Subject: Error SQL0132N A LIKE predicate..
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.
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
******************************************************
The information in this E-mail and in any attachment is
confidential and is intended solely for the addressee.
Access, copying, disclosure or use of such information
by anyone else is unauthorised. If you are not the
intended recipient please contact [Email address protected]
While reasonable efforts are made to ensure these files are free
of virus infection and offensive materials, if something of this
nature is inadvertently sent to you, please destroy it, accept
our apologies and contact [Email address protected] with
details of the sender. We will ensure that action is taken
immediately to prevent any recurrence. Debenhams accept no
responsibility for any views expressed by the originator of this email.
Debenhams Retail plc (reg. no. 83395) Registered in England and Wales.
Registered office: 1 Welbeck Street, London W1G 0AA.
http://www.debenhams.com
******************************************************
DB2 & UDB email list listserv db2-l LazyDBA home page