Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. how to compare two data tables having same column and contain some values according to column name using stored procedure in sql dbx?

how to compare two data tables having same column and contain some values according to column name using stored procedure in sql dbx?

Scheduled Pinned Locked Moved C#
databasetutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11950984
    wrote on last edited by
    #1

    Lets consider table 1 contain 30 column and table 2 is 30 column.i want to compare values one by one with respect to column name.eg.Table 1 column are A,B,C.. and Table 2 Column A,B,C....And values are xyz,abc,pqr and from table 2 xyz,jkl,pqr.Final result is Right,wrong,right likewise..

    L M N 3 Replies Last reply
    0
    • U User 11950984

      Lets consider table 1 contain 30 column and table 2 is 30 column.i want to compare values one by one with respect to column name.eg.Table 1 column are A,B,C.. and Table 2 Column A,B,C....And values are xyz,abc,pqr and from table 2 xyz,jkl,pqr.Final result is Right,wrong,right likewise..

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Very interesting, do you have a question?

      1 Reply Last reply
      0
      • U User 11950984

        Lets consider table 1 contain 30 column and table 2 is 30 column.i want to compare values one by one with respect to column name.eg.Table 1 column are A,B,C.. and Table 2 Column A,B,C....And values are xyz,abc,pqr and from table 2 xyz,jkl,pqr.Final result is Right,wrong,right likewise..

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        Assuming the tables have the same primary key then do an inner join on the PK and compare each field. Your question is ambiguous, do you want to compare each field in each record, the distinct of each column. try explaining it again in more detail and we may be more useful.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • U User 11950984

          Lets consider table 1 contain 30 column and table 2 is 30 column.i want to compare values one by one with respect to column name.eg.Table 1 column are A,B,C.. and Table 2 Column A,B,C....And values are xyz,abc,pqr and from table 2 xyz,jkl,pqr.Final result is Right,wrong,right likewise..

          N Offline
          N Offline
          ngoj
          wrote on last edited by
          #4

          I assume you are talking about C# client side comparing with DataTable object(s). It that is the case you should check this: www.dotnetperls.com/datatable-compare-rows

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups