• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

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]

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]
1 Solution
That happen with SQL Server 2008, and  it seems to be a bug in MS SQL Management Studio for MS SQL 2008....Please report it. :)
For SQL Server 2005 it just work fine.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now