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
 Temp Tables

Author  Topic 

smithani
Starting Member

42 Posts

Posted - 2007-09-04 : 11:55:32
hi All,
I am using a temp table creating it as

create table #process
(
tons of coomuns in here
)
then
insert into #process(collumns)
select from peon
where etc....

Can i use the same temp table definition , but insert into another tempTable.Does alias help me accomplish this task.
Thanks for your input

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-09-04 : 12:10:08
>>>Can i use the same temp table definition , but insert into another tempTable.Does alias help me accomplish this task.

Can you rephrase your question please? Perhaps with an example?

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-04 : 22:34:28
Can try 'select ... into ... from ...' in same session.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-09-05 : 06:41:15
quote:
Originally posted by smithani

hi All,
I am using a temp table creating it as

create table #process
(
tons of coomuns in here
)
then
insert into #process(collumns)
select from peon
where etc....

Can i use the same temp table definition , but insert into another tempTable.Does alias help me accomplish this task.
Thanks for your input




Yes you can

create table #new_process
(
tons of coomuns in here
)
then
insert into #new_process(collumns)
select from #process
where etc....


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -