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
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS Temporary Tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-05-13 : 08:16:24
carl Evans writes "I'm using a DTS job to perform an operation and I would like to declare a temporary ie

CREATE TABLE #ProcessBatch
(
BatchID INT,
BatchDate DateTime
)



INSERT INTO #ProcessBatch
SELECT *
FROM CenBatch
Where BatchDate > DATEADD(DAY,-100,getdate())

In the the Transform Data task properties I recieve this an error
error source:Microsoft OLE DB Provider for SQL Server
Error Description: deferred prepare could not be completed statement(s) could not be prepared
Invalid object name '#ProcessBatch'


This same statement ran in Query Analyzer will return results. I can create the table in the transform data task, but it will not allow me to use it???

Can anyone shed light on this"
   

- Advertisement -