10-19-2006 10:56 PM
Hello,
I have a need to delete some entries from a table type where ID = some string.
Is it possible to do it in code without loops?
Can you plese provide correct syntax?
Thank you.
Georgy
10-19-2006 10:58 PM
10-19-2006 10:58 PM
10-19-2006 11:01 PM
Hello Rich,
Thanks for the answer.
I was doing
delete from itab where ...
This is why it was not working.
10 points to you since you are the first one to reply.
Thank you.
Gerogy
10-19-2006 11:03 PM
10-19-2006 11:04 PM
10-19-2006 11:00 PM
Hi,
Use the where condition in the delete statement..
DELETE ITAB WHERE FIELDNAME = 'SOME STRING'..
Thanks,
Naren
10-19-2006 11:04 PM
Hi Georgy
It must be an internal table which might have been defined from table type.
Yes you can delete records from internal table. Here are few statements and use whichever suits your requirement.
- DELETE itab INDEX idx.
- DELETE itab FROM idx1 TO idx2.
- DELETE itab WHERE Field = Value.
- DELETE ADJACENT DUPLICATES FROM itab Comparing Field1 Field2 .... (Sort the table by Field1 Field2 .. before deleting duplicate entries)