Link to home
Start Free TrialLog in
Avatar of jentel2
jentel2

asked on

Sql Server Managament Studio 2008 not scripting for SQL Server 2000 properly

I have SQL Server Management Studio connecting to a SQL Server 2005. I am using studio to script a database targeted for SQL Server 2000. 'Script for server version' is set to sql server 2000.
However the generated script error out because the syntax is not for 2000. Is this a bug in Studio?

For example:
IF  EXISTS (SELECT * FROM sysobjects WHERE object_id = OBJECT_ID(N'[dbo].[ApproveOrder]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[ApproveOrder]
GO

then I have to manually change it to:

IF  EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[ApproveOrder]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[ApproveOrder]
GO
ASKER CERTIFIED SOLUTION
Avatar of Ernariash
Ernariash
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial