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.
Author |
Topic |
kumarasari
Starting Member
2 Posts |
Posted - 2013-05-24 : 23:59:28
|
Hi,allwe have using below query but not getting total records count pls give me any correct answer..ALTER PROCEDURE [dbo].[TOTAL2]( @FILE_NAME varchar(100) )ASBEGINDECLARE @TOTAL VARCHAR(100)='SELECT COUNT(*) FROM OPENROWSET(''Microsoft.ACE.OLEDB.12.0'', ''Excel 12.0;Database='+@FILE_NAME +';HDR=YES'', ''SELECT * FROM [Sheet1$]'')' END |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-05-25 : 09:41:47
|
if your attempt is to return the total by executing the query, you need to use sp_executesql for executing itseehttp://support.microsoft.com/kb/262499------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|