Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Openrowset function

Author  Topic 

chbala85
Starting Member

49 Posts

Posted - 2014-04-24 : 02:19:51
Hi All,

My system details:

Microsoft SQL Server 2008 R2 (SP1) - (X64) Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

Office 2010(32 bit)

---I configured below setting also--

exec sp_configure 'show advanced options', 1

reconfigure

GO

exec sp_configure 'Ad Hoc Distributed Queries', 1

reconfigure

GO

EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1

GO

EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1

GO

EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0'


--------------------


I am running below query


INSERT INTO OPENROWSET ('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\intricareReportData\SourceData\Adhoc\Excel_Structure_Path\FluShotCurrentReport.xlsx',
'SELECT * FROM [T$]')
SELECT [memberid]
,[lastname]
,[firstname]
,[nurse]
,[Date]
,[Status]
FROM Testing.[dbo].[intricare_Adhoc_FluShotDueReport]

if run the above query,Not giving any error but till running ..........


Please help me.

Thanks,
Krishna


   

- Advertisement -