dbTalk Databases Forums  

Extract Temp table script from SMS

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Extract Temp table script from SMS in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Disney
 
Posts: n/a

Default Extract Temp table script from SMS - 02-28-2008 , 02:28 PM






I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.

Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM






There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
  #3  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM



There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
  #4  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM



There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
  #5  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM



There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
  #6  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM



There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
  #7  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM



There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
  #8  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM



There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
  #9  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM



There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
  #10  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Extract Temp table script from SMS - 02-28-2008 , 05:30 PM



There is no way that I know of but you can just as easily select into a real
table in Tempdb and script that one. Just remember to drop the table when
done.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Disney" <Disney (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a developer request to extract script of the temp table that he
created in tempdb through SMS how would we do that


If I have created the temp table…
SELECT ‘Usernae'[Name], 32 [Age]
INTO #DELETE_ME

How can I generate a list of the columns in table #DELETE_ME

Typically I use Management Studio and right click the table and choose
“Generate Table as”…”Select To”.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.