yokzu

yokzu

  • NA
  • 306
  • 0

Comparing 2 columns values

Sep 11 2011 8:11 AM
Hi,
I have 2 table and 1 column in each one like this;
------------------------------------------------------------------

Column1                Column2
1                           3
2                           4
3
                           5
4                           6
...                          ...
------------------------------------------------------------------

I want to compare column1's values with column2, and get the values which arent exist in column2. For example in this instance, I want to get "1" and "2" values.

Obversely, when I compare column2's values with column1, I want to get only these values; "5" and "6"

I tryed datatable, datareader and lots of codes but I didnt get the logic. How can I do that?

Regards.

Answers (2)