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

Posted on 2008-11-18
Medium Priority
Last Modified: 2012-08-13
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]
Question by:jentel2
1 Comment

Accepted Solution

Ernariash earned 1500 total points
ID: 22986176
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.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question