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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting syntax error when trying to use nvarchar(max) 1

Status
Not open for further replies.

gtob5

Technical User
Mar 16, 2009
4
US
Using SQL Server 2005 Std Edition on two different systems
on one the following code works and on the other I get a syntax error near 'max'.

create table tbla (
id int not null,
abx nvarchar(max) null)

if I substitute 255 for max, it works.

all the settings seem to be identical.
any ideas?
 
Before you go crazy.... can you make sure it's a SQL 2005 instance? It's super easy to tell. Run this...

Code:
Select @@Version

If the output begins with.... Microsoft SQL Server 2000, then there is nothing you can do to use the nvarchar(max).

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Obvious answer - you're not using SQL Server 2005 on the other server.

Try

SELECT
SERVERPROPERTY('Edition') AS Edition,
SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductLevel') AS ProductLevel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top