a guest Feb 19th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --execute step by step to process excel data into sqlserver using OPENROWSET/OPENDATASOURCE
  2. sp_configure
  3. sp_configure 'show advanced options',1
  4. reconfigure
  5. sp_configure 'Ad Hoc Distributed Queries',1
  6. reconfigure
  7. SELECT * INTO XLImport8 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
  8. 'Excel 8.0;Database=D:StatusReport.xls', 'SELECT * FROM [Sheet1$]')
  9. select * from XLImport8
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand