Bulk Insert Errors

  • I have now moved it out of the root drive but I am still getting the same error

  • See the edits of my earlier post!

    GilaMonster (3/30/2015)


    If that's an excel spreadsheet, you don't need and shouldn't be using a format file, you should be specifying the driver that you installed earlier and importing it as an excel spreadsheet. Format file is for a text file. Excel spreadsheets aren't text.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Sorry I didn't see that. Will will try it and let you know what happens.

  • Hi Gila,

    It works with the following code:

    SELECT * FROM OPENDATASOURCE( 'Microsoft.ACE.OLEDB.12.0', 'Data Source="D:\DatabaseAdmin\EuroSales.xlsx";

    Extended properties=Excel 8.0')...EUROSALES$

    Just one question, how do I now select only the columns that I want, because sometimes there are random columns at the back with no data, when they don't delete the whole column in excel, but only the data in the column.

  • Don't use SELECT *.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • :blush: sorry that was a crazy stupid question..I am so stressed about this thing I am making stupid mistakes now..let me just take a quick break

  • Now it says my last to column names are invalid, but I copied it from the spreadsheet into my select statement, so how can they be invalid?

  • Spaces or other unprintable characters.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I just saw when I selected *, it made the column names vat# instead of vat., so that was the problem. Thanks for everyone's patience, time and help in this matter, I really appreciate it guys.:-)

Viewing 9 posts - 16 through 23 (of 23 total)

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