using openrowset to import Excel data sheet to sql table

  • Hello Comunity

    I´am curious about this kind of method to import into SQL 2005 an Excel Sheet.

    I try this script :

    INSERT INTO dbo.st

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

    'Excel 8.0;Database=C:\test.xls', [sheet1$])

    but i have the following error :

    37000(7405)[Microsoft][SQL Native Client][SQL Server]Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query. (0,09 secs)

    Someone could help me

    Many thanks

    Luis Santos

  • Look up the SET ANSI_WARNINGS and SET ANSI_NULLS statements in the Books Online, and let us know what you find...

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

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