I have two tables- A and B. I need to check if a particular module exist in table A then need to pick module-id from A. means
where mdl = 'xxx'
in table B I have a string value under a column say C. The mdl-id from above query comes somewhere in between the string and If a match found I need another sec-id (obviousl another column in table B). keyword like is not working here because I couldnt make a query that can take dynamic LIKE.
what I written is-
select a.mdl, a.mdl-id, b.sec-id
from A a, B b
where a.mdl = 'XXX'
and b.C like '%a.mdl-id%
select a.AVLB_RULE_MDL_ID , a.AVLB_RULE_ID
from &db.AVLB_RULE a
, &db.AVLB b
in ('BA4OX321', ' BA4OX344')
AND LOCATE ( char(a.AVLB_RULE_ID), char(b.AVLB_FRML_TX) ) > 0