Raghavendra Joshi

Raghavendra Joshi

  • NA
  • 44
  • 45.6k

How to compare two datatable columns names

Sep 2 2014 1:59 AM
HI,

I would like to compare columns of 2 data table.

my 1st data table:
        
 app_IDintTrueAppIDBoth
 app_NamevarcharTrueAppNameBoth
 app_AdressvarcharTrueAppAddressBoth
 app_LattitudevarbinaryTrueAppLatitudeBoth
 app_LongitudevarbinaryTrueAppLongitudeBoth
 app_Gendercharfalse
 app_IsApplicationCorrectbitfalse

and my 2nd table:
 app_IDint
 app_Salutationvarchar
 app_Namevarchar
 app_Adressvarchar
 app_Lattitudevarbinary
 app_Longitudevarbinary
 app_Genderchar
 app_IsApplicationCorrectbit
 app_IsWorkingProperbit

i want to compare 1st and 2nd tables 1st column and check for new data if available and add the data from 1st table to 2nd table...

OUT PUT should be:

app_IDintTrue AppIDBoth
app_Salutationvarcharfalse

app_NamevarcharTrueAppNameBoth
app_AdressvarcharTrueAppAddressBoth
app_LattitudevarbinaryTrueAppLatitudeBoth
app_LongitudevarbinaryTrueAppLongitudeBoth
app_Gendercharfalse

app_IsApplicationCorrectbitfalse

app_IsWorkingProperbitfalse





Answers (4)