Created
July 12, 2012 17:41
-
-
Save gjergjsheldija/3099569 to your computer and use it in GitHub Desktop.
duplicate rows on table across multiple columns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
distinct n1.bill_nr as first | |
from care_med_products_main_movements as n1 | |
join care_med_products_main_movements as n2 | |
on | |
n1.id_sub = n2.id_sub and | |
n1.bill_nr = n2.bill_nr and | |
n1.medicament = n2.medicament and | |
n1.qty = n2.qty and | |
n1.price = n2.price and | |
n1.expiry_date = n2.expiry_date and | |
n1.id != n2.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment