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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-05-24 : 06:44:11
|
Sevugan writes "Hi, I am creating a global temporary table(##TempTable)in one of the steps of a DTS Package. In the next step I am trying to fetch the records from thattable. At that point of time, I am getting object not found error. How to resolve this?Regards,Sevugan.C" |
|
SreenivasBora
Posting Yak Master
164 Posts |
Posted - 2005-05-24 : 12:21:37
|
OK. open DTS designer and open a new package.1. estabilsh a new connection to TempDB2. select "Execute SQL Task" from toolbox and provide SQL Connection and write SQL Query as "select top 10 * into Tempdb.dbo.##Temp_authors from pubs.dbo.authors"3. Select one more "Execute SQL Task" from toolbox and provide SQL Connection and paste the below sql script"Update Tempdb.dbo.##Temp_authors set state = 'CA.' where state = 'CA'"4. save the package and run the package.5. Now goto Query anlyzer and run the queryselect * from Tempdb.dbo.##Temp_Authors. U can get the results from Global Temporary table. :-)With RegardsSreenivas Reddy B |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-05-24 : 13:06:13
|
The temp table will be droped when the connection is closed - maybe the creating connection is dropped before you try to access it on another connection.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|