开发者

SQL LIKE Column Value Plus Wildcard DB2

I'm trying开发者_StackOverflow to use a column and a wildcard in a LIKE clause. I was expecting this to work:

WHERE COLUMNA LIKE '%'||COLUMNB||'%'

Is this supported in DB2?


Should be able to use the locate syntax (http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.sqlref/fsubstr.htm)

WHERE LOCATE(COLUMNB,COLUMNA) > 0
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜