Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

creating DDL from a temporary table
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

Report this thread to moderator Post Follow-up to this message
Old Post
Abroit
08-31-05 04:23 PM


RE: creating DDL from a temporary table
Materialize the table, then script it:

Select * INTO  SomeMaterializedTabl
e
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 tabl
e
> 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

Report this thread to moderator Post Follow-up to this message
Old Post
Jens Süßmeyer
08-31-05 04:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 01:48 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006