Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement