Forum Discussion
krypto6969
Helper II
10 years agoCan't use Temp Tables - really?
Using direct import to stored proc that uses temp table..get this error? WTF?
Anonymous
10 years agoNot applicable
krypto6969You could try making your insert logic dynamic. As an example, I've used the script outlined in this blog to pull in SQL metrics, so I know it works. But you would most likely do something utilizing EXEC against a variable or sp_executesql like here
Or.. I just figured this out. For some reason if you wrap your Sproc in a variable, it works. So just build a sproc for the below code and you can run it like this. (Import only, Direct Query doesn't work)
DECLARE @sqlCommand varchar(1000)
SET @sqlCommand = 'dbo.Testproc'
EXEC (@sqlCommand)
mattlazarus
Advocate I
8 years agoSPROC option worked from me. Thanks :-)