Oracle
 sql >> Datenbank >  >> RDS >> Oracle

Dynamische parametrisierte Abfrage mit Like

Sie müssen den '%' verketten Literale:

AND APP_FRAMES.APP_EXT_CODE LIKE '%' || :IN_APP_EXT_CODE || '%'; 

Die ganze Abfrage wäre:

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 || ''%'' ';