Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

SQL Help Needed

Back to Forum: Tech Off
  • User profile image
    P+E

    Hi All,

    I'm having problem with import excel file automatically  into the database using SQL, i know that we can import the file manually from SQL.
    However, i want it to run automatically.
    That's why i am trying to write a store procedure to do that but i am having some problems.is it possible?

    Thanks

  • User profile image
    LiquidSpy

    I've not tried it myself, but try this...

    SELECT * INTO XLImport5 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
    'Excel 8.0;Database=C:\test\xltest.xls', 'SELECT * FROM [Customers$]')

    Get more information here...

    http://support.microsoft.com/?kbid=321686

    Hope that helps!

  • User profile image
    SimonJ

    In SQL Server 2000 you should use Data Transformation Services
    In SQL Server 2005 you should use SQL Server Integration Services

    DTS and SSIS packages can then be scheduled to run automatically whenever you need them.

    SimonJ

  • User profile image
    P+E

    Thanks!

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.