Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9017683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:20:02+00:00 2026-06-16T04:20:02+00:00

USE [DatabaseName] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON

  • 0
USE [DatabaseName]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TableName](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [URL] [varchar](max) NOT NULL,
    [User] [varchar](1000) NOT NULL,
    [Time] [datetime] NOT NULL,
 CONSTRAINT [PK_TableName] PRIMARY KEY CLUSTERED 
(
    [ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

it works on development environment which is SQL Server 2005 but doesn’t work on SQL Server 2012 and gives this error,

Msg 170, Level 15, State 1, Line 3 Line 3: Incorrect syntax near
‘max’.

EDIT

2012 is actually 2000 but Network admin did something so that I can connect to it using 2012 management tool studio

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:20:04+00:00Added an answer on June 16, 2026 at 4:20 am

    The reason for this error is when user is tring to attempt to run query or procedure or logic which is not compatible with previous version of the SQL Server. When SQL Server 2000 is upgraded to SQL Server 2005 or SQL Server 2008, the database object compatibility should be also upgraded to next version. When database compatibility is set to previous version and they are attempted with procedure of newer version they will throw above error.

    Fix/Workaround/Solution:

    Change the database compatibility level using following command.

    EXEC sp_dbcmptlevel 'DatabaseName', 90
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got this: SET @databasename = (SELECT DATABASE()); USE @databasename; ...SQL Querys... But this
So I've got this audit table, looks like this: USE [DatabaseName] GO /****** Object:
I've tried the obvious: USE linkedServerName.databaseName Which gives me the error: `Could not locate
I use Entity Framework code-first. DataBaseName - I want to create a database in
DECLARE @DatabaseName NVARCHAR(max); SET @DatabaseName = 'MainDb' USE @DatabaseName Wouldn't work. How to make
use Text::Table; my $tb = Text::Table->new(Planet,Radius\nkm,Density\ng/cm^3); $tb->load( [ Mercury,2360,3.7], [ Mercury,2360,3.7], [ Mercury,2360,3.7], );
I need to create a view or a table valued function that returns one
DELIMITER $$ USE `horizon_jake`$$ DROP FUNCTION IF EXISTS `GPS_Distance_Meters`$$ CREATE DEFINER=`horizon_jake`@`localhost` FUNCTION `GPS_Distance_Meters`(lat1 DOUBLE,
Here is the script with the unnecessary parts striped out USE databaseName BEGIN TRY
In a SQL server database I have have this kind of table : EVENT201201.dbo.EvAcc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.