I need to write a DDL Create script for a table in TempDb.
In Query Analyzer, I can see the table, but when I right click on the table
and attempt to script the Create I get a message telling that it could not
find the object in the collection (and it suggests I may want to use
qualifiers).
In Enterprise Manager, I can not see any user talbes in TempDb.
How do I get the scripts, ie, the DDL Create syntax...besides writing it
myself.
I have about 30 views which need to be changed to tables
Thaniks
Materialize the table, then script it:
Select * INTO SomeMaterializedTable
From #YourTempTable
Where 1= 2 --To have no rows, only the structure
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Abroit" wrote:
> I need to write a DDL Create script for a table in TempDb.
> In Query Analyzer, I can see the table, but when I right click on the table
> and attempt to script the Create I get a message telling that it could not
> find the object in the collection (and it suggests I may want to use
> qualifiers).
> In Enterprise Manager, I can not see any user talbes in TempDb.
> How do I get the scripts, ie, the DDL Create syntax...besides writing it
> myself.
> I have about 30 views which need to be changed to tables
> Thaniks
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment