Sample Header Ad - 728x90

Deleting duplicate rows with condition(Using SQL and LINQ)

1 vote
2 answers
1551 views
I have a table with 5 columnsID,CPT4,CPT4Mod,ItemCharge,Eff_Date. **Deletion Condition:** When rows exists with duplicate CPT4and CPT4Mod field values but different ItemCharge and Eff_Date values, exclude all but the most recent Eff_Date records. I need a query which can achieve this in two scenarios. 1. When CPT4Mod is given by the user. 2. When CPT4Mod is not given by the user. Later I need to achieve the same using LINQ.
Asked by Rajesh (109 rep)
Dec 21, 2014, 05:13 PM
Last activity: Dec 21, 2014, 10:29 PM