OBJECT_SCHEMA_NAME function was newly introduced in SQL Server 2005 SP2. If you have not applied SP2 you will have "OBJECT_SCHEMA_NAME is not a recognized built-in function name" error.
Download and Install SP2 to solve this problem.
Sunday, May 17, 2009
Monday, May 4, 2009
FAQ : How to import MS Excel 2007 data to SQL Server
Import data from Office 2007 Excel to SQL Server
SELECT * INTO YourTableName FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=C:\YourExcelfilename.xlsx', [Sheet1$])
Import data from Office 2003 Excel to SQL Server
SELECT * INTO YourTableName
FROM OPENROWSET ('Microsoft.Jet.OLEDB.4.0','Excel 8.0; Database=c:\bb.xls',
'SELECT * FROM [Sheet1$]') AS XL
SELECT * INTO YourTableName FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=C:\YourExcelfilename.xlsx', [Sheet1$])
Import data from Office 2003 Excel to SQL Server
SELECT * INTO YourTableName
FROM OPENROWSET ('Microsoft.Jet.OLEDB.4.0','Excel 8.0; Database=c:\bb.xls',
'SELECT * FROM [Sheet1$]') AS XL
Labels:
Data import,
Excel 2007,
FAQ,
openrowset
Subscribe to:
Posts (Atom)