Re: Using like with a column name

Re: Using like with a column name

 

  

KEITH ?

Why not trying the MTK of IBM to migrate , It has also nice gui .

Bonne reception , Best regards, Mit freundlichen Grüssen

Amr Roushdi







"Thompson Keith "
<db2udbdba-ezmlmshield-x80675655.[Email address protected]
27-06-07 22:18

To
"LazyDBA Discussion" <[Email address protected]
cc

Subject
Using like with a column name






I need to convert some SQL server sql to db2. The sql I am starting
with looks like this:

WHERE (UserSecurityAttributes.dAttributeName LIKE '%' +
DocumentAccounts.dDocAccount + '%')

They are trying to allow padding of extra characters on either side of
the column name. DB2 returns the error below when a like is used with a
column name.

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

Is there another way to do this in db2?

Thanks,

Keith


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



DB2 & UDB email list listserv db2-l LazyDBA home page