Abhishek  Jaiswal

Abhishek Jaiswal

  • 108
  • 20k
  • 7.9m

Logic for this operation

Sep 9 2014 12:11 PM
I have a table in my database say Tab1(col1, col2)
entries are(corresponding entries)
Col1 col2
a - sep1
b - sep2
c - sep3
d - sep4
e - sep5
 
now if i upload new entries like
Col1 col2
a - sep3
b - sep2
 
so if this new entries does not exits then it simply INSERT these new entries else update it.
I want C# logic for it,
I tried this but its not working
if (isWellIdExists(impexp.WellId) && isUploadedDateExists(impexp.UploadedDate))
{
int result = ExecuteQuery("UpdateImpExp");
}
else
{
int result = ExecuteQuery("InsertImpExpData", 
SerialIDParameter
WellIdParameter, 
);
}

Answers (5)