SQL Server syntax error

  • I'm receiving this error:

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near '90'.

    when i trie to compile this t-sql:

    ALTER DATABASE SGCT SET compatibility_level = 90

    Does anyone know why?

    thank you,

    Pedro

  • If this is SQL Server 2005 Try this:

    USE [master]

    GO

    EXEC dbo.sp_dbcmptlevel @dbname=N'Database_Name', @new_cmptlevel=90

    GO

  • The only thing that I can think of that would cause it may be a case sensativity issue. Try this and see if it works.

    ALTER DATABASE [SGCT] SET COMPATIBILITY_LEVEL = 90

  • Kenneth Langner Jr. (7/1/2009)


    If this is SQL Server 2005 Try this:

    USE [master]

    GO

    EXEC dbo.sp_dbcmptlevel @dbname=N'Database_Name', @new_cmptlevel=90

    GO

    That's right. I have been working with 2008 for too long. 🙂

  • this :

    EXEC dbo.sp_dbcmptlevel @dbname=N'Database_Name', @new_cmptlevel=90

    resolved the question.

    thank you

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply