Skip to Content
0
Former Member
May 23, 2013 at 07:32 PM

How can I use 'LIKE' along with DELETE?

7638 Views

Hello,

I am trying to remove specific data from an internal table. However, in order to remove, for example, everything that starts with 'sap' I would have to use the operator LIKE (WHERE str LIKE 'sap%').
The problem is that the SQL command DELETE doesn't allow me to do, for example:

DELETE itab WHERE str LIKE 'sap%'

I get an error saying that LIKE isn't an allowed relational operator (such as EQ or GE).

Thank you very much in advance!