Hi I have bulk of data in excel sheet i should enter that data into sql database the problem is in sql database i have data before only before inserting the data is should check and enter and the excel sheet data should go for three different tables how to that please help me
Create a working table to import the data to, then split the data to the three tables as appropriate.
You can also use BULK INSERT OR OPENROWSET, something like this:
sp_configure 'show advanced options', 1
sp_configure 'Ad Hoc Distributed Queries', 1
SELECT * INTO tblImport
'Excel 12.0 Xml;HDR=YES;Database=C:\testdata.xlsx;',
'SELECT * FROM [Sheet1$]')