Educational Materials like Computer, engineering, software and Property , Entertainment: creating a new table from the duplicate records using a distinct query and deleting the duplicate records
Custom Search

Subscribe Now: Feed Icon

January 29, 2012

creating a new table from the duplicate records using a distinct query and deleting the duplicate records

Axapta Code solutions   Earn Money its Real

Summary:
creating a new table from the duplicate records using a distinct  query and deleting the duplicate records in the table (not the created  table) then appending the created table to the original table.

Details:

Execute this query with the columns and table name. All the d duplicate
records will be removed

with x
as
(select *, ROW_NUMBER() over(PARTITION_FRAGMENT_ID by column1,coluns2,
over colun1,coluns2,...) ID from TableName )
delete from x where IDENT_CURRENT>1;

0 comments:

Post a Comment

Follow by Email

Video Bar

Loading...

Followers

Educational Materials like Computer, engineering, software and Property , Entertainment

Recent Visitors

Active Search Results
Wink Bingo | Slots Tips | Football manager 2010 | blackjack free | Poker Stars
Submitdomainname.com