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
精彩评论