Dynamic Parameterized Query With Like
The Normal assignment operator is working fine but like operation is not working with below query in a Stored Procedure, Could you correct what is wrong with the query? On changing
Solution 1:
You have to concatenate the '%' literals:
AND APP_FRAMES.APP_EXT_CODE LIKE '%'||:IN_APP_EXT_CODE||'%';
The whole query would be:
QUERY_STR := 'select * from APP_FRAME_PROPERTIES,APP_FRAMES
Where APP_FRAME_PROPERTIES.APP_EXT_CODE = APP_FRAMES.APP_EXT_CODE
AND APP_FRAMES.APP_EXT_CODE LIKE ''%'' || :IN_APP_EXT_CODE || ''%'' ';
Post a Comment for "Dynamic Parameterized Query With Like"