I have wko(Workorder) table exist in my ERP. Now i have some excel sheet that contains some new workorder(more than1000 Records). Now i need to insert all the records which present in the sheet to wko table. Please tell me how to insert multiple records from excel sheet.
Thanks
Mohammed
You can open an excel sheet as a rowset using OPENROWSET
-
Insert into WKOTABLE
-
SELECT *
-
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
-
'Excel 8.0;Database=C:\spreadsheetname.xls', 'SELECT * FROM [worksheetname$]')
-
There are some limitations to this however. You must have local and exclusive access to the file from the SQL server. Meaning it must be directly accessible from the server and no one can have it open.