Posted - 05/31/2012 : 17:25:59
| Hi there
My requirment is to import contacts into our SQL Database through ASP.NET application.
XL File are used to import contacts through the ASP.NET application all the records from the xl file are inserted into the table Temp_Contacts
Then I want to compare records in Temp_Contact table with the records in the Staff table, To determine if its an Insert or Update.
Fields in Temp_Contact table
SiteID, ContactTypeID,FirstName, LastName, Designation, Mobile, Phone, email, StaffID = 0
Fields in Staff table
StaffID, SiteID, ContactTypeID,FirstName, LastName, Designation, Mobile, Phone, email
I need a SQL query to determine if the records are to be updated or inserted.