cancel
Showing results for 
Search instead for 
Did you mean: 

Delete distinct records from an internal table.

Vishal__2546
Explorer
0 Kudos

HI,

I want to delete distinct records from an internal table.

I am giving images for your reference.

Vishal__2546_0-1713416197633.png

These are the records in the table. I want to delete order number 4 from this table because it is only distinct records present in this table.

Vishal__2546_1-1713416288899.png

Thanks,

Vishal.

 

 

Sandra_Rossi
Active Contributor
0 Kudos
Question asked again and again. Use your Web search engine: Delete distinct records from an internal table site:sap.com

Accepted Solutions (0)

Answers (3)

Answers (3)

thomas_mller13
Participant

This is a DB Table

Vishal__2546
Explorer
0 Kudos
No, It is custom table
thomas_mller13
Participant
0 Kudos
It IS a DB table!
NaveenKumarC
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

Get the count based on the Order number. Delete the records where the count is 1. You can use this logic.

Regards,

Naveen Kumar Chikkanna.

raymond_giuseppi
Active Contributor
0 Kudos

You can identify your so-named "distinct" (single) records with a simple SELECT statement such as SELECT with aggregation and having clause. So why won't you try to use a single DELETE statement with a subquery.

Read online documentation such as DELETE dbtab / WHERE sql_cond - subquery_clauses  / SELECT, GROUP BY  and HAVING