Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble with varchar(max)

Status
Not open for further replies.

tuzojazz

Programmer
Dec 26, 2005
58
0
0
MX
Hi guys:

I have this line

declare @v varchar(max)

and I get this error

Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'max'.

I'm using sql server 2005 and I have read I must set compatibility level at 90 but when I type this code

EXEC sp_dbcmptlevel 'MyBase', '90';

I get this

Msg 15416, Level 16, State 1, Procedure sp_dbcmptlevel, Line 92
Usage: sp_dbcmptlevel [dbname [, compatibilitylevel]]

Valid values of database compatibility level are 60, 65, 70, or 80.

What can I do?
Thanks!
 
Run this:

Code:
select @@Version

If this reports Microsoft SQL Server 2000, then you are actually running SQL 2000. Even if the compatibility level of a SQL2005 database is set to something earlier, it will still report the correct version.



-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top