Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

generating .aql scripts in sql server 2005

Status
Not open for further replies.

ice7899

Programmer
May 14, 2006
59
GB
Is it possible to generate a .sql script in the sql server 2000 format using sql server 2005

I would like to generate a script in this format using 2005




if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CLSFD_AdBlocks]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CLSFD_AdBlocks]
GO

CREATE TABLE [dbo].[CLSFD_AdBlocks] (
[BlockID] [bigint] IDENTITY (1, 1) NOT NULL ,
[MemberID] [bigint] NULL ,
[SenderEmail] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[SenderIP] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[CLSFD_AdBlocks] WITH NOCHECK ADD
CONSTRAINT [PK_CLSFD_AdBlocks] PRIMARY KEY CLUSTERED
(
[BlockID]
) ON [PRIMARY]
GO
 
Unfornitually no. Microsoft wasn't able to get this functionality into the final release. We are all hopping that it will be comming along is a future service pack release.

If you right click on the database in the object explorer you can get to the scripting wizzard. You will need to run it twice. Once for the drop and once for the create.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top