== Why is this an issue?

Removing duplicate entries from driver tables enables ``++OPEN SQL++`` to generate fewer queries for getting the same data, giving a performance boost.


=== Noncompliant code example

[source,abap]
----
SELECT carrid , connid , seatsocc FROM flights
INTO TABLE seatsocc_tab
FOR ALL ENTRIES IN conn_tab
WHERE carrid = conn_tab-carrid
AND connid = conn_tab-connid.
----


=== Compliant solution

[source,abap]
----
SORT conn_tab BY carrid.
DELETE ADJACENT DUPLICATES FROM conn_tab COMPARING carrid.
...
SELECT carrid , connid , seatsocc FROM flights
INTO TABLE seatsocc_tab
FOR ALL ENTRIES IN conn_tab
WHERE carrid = conn_tab-carrid
AND connid = conn_tab-connid.
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Potential duplications in "xxxx" should be deleted before this "SELECT".


endif::env-github,rspecator-view[]
