How to import excel file into a table SQL server without using DTS,...

  • Anyone help to provide me a SQL query b/c I want to import an excel file into a table

    Thanks

  • You could search BOL or google for OPENROWSET and SELECT INTO.

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • You could use import export wizard or

    Change the following query for inserts

    SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;Database=c:\test.xls', Sheet1$)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply