My cursor's Select query has the following like clause in its WHERE clause, but the procedure failed to compile, because of this like clause.
Code:
SELECT table1.colid, col3 FROM table1, table3
WHERE table1.colid like 'table3.colid'
ORDER BY table1.colid;
here the colid of both the table are of type varchar(2)
But DB2 allows only string constants and not a column value in the pattern match of a like clause.
(ie. the above query works fine if the WHERE clause is,
table1.colid like 'aa')
could any one suggest me on how to use the column value here in the pattern match of the like clause..
Regards
Sn