You must Sign In to post a response.
  • Category: ASP.NET

    How to find identical and nonidentical rows from datatable based on primary key column.

    How to find identical and nonidentical rows from datatable based on primary key column.

    I don't want to mention column name directly for primary key because primary column differs for every table. (I want to make it global to accept any number of primary keys)

    Tried : I used dt1.AsEnumerable().except(dt2.AsEnumerable()) which is checking lastupdated column(timestamp). So "except" not working as I expect
  • #765737
    hi

    when you execute query get the ordinal position in your table then use that index value

    for ex

    objectname[indexname]

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #766313
    Hi
    you can go through Below links


    "xaprb.com/blog/2006/10/09/how-to-find-duplicate-rows-with-sql/"

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.


Sign In to post your comments