Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    1

    Unanswered: Importing from excel

    Hi there, could let me know how to reference to an excel database in SQL code?

    I think

    Select * from OPENROWSET ('Microsoft.Jet.OleDB.4.0', 'EXCEL 8.0;Database=C:\MyExcel1.xls',Sheet1$)

    Would import everything from a spreadsheet but im not sure how you can reference individual columns?

  2. #2
    Join Date
    Feb 2004
    Location
    Poland
    Posts
    96
    Select column_name from OPENROWSET ('Microsoft.Jet.OleDB.4.0', 'EXCEL 8.0;Database=C:\MyExcel1.xls',Sheet1$)
    where ......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •