Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Alter Table Alter Column problem
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 04/09/2002 :  13:05:11  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
Paul writes "I am trying to run the following script:

Alter table <table Name>
alter column <column name> char(10) not null

This works on 4 different systems we have tried in house but on one particular site I get the error message:

Server: Msg 170, Level 15, State 1, Line 4
Line 4: Incorrect syntax near 'column'.

Both systems are on SQL 7 service pack 3.

Is there any known reason why this would work on one system and not the other. (Both servers are NT4, the one that works SP5 and the one that doesn't SP6)"

Most Valuable Yak

15732 Posts

Posted - 04/09/2002 :  13:33:08  Show Profile  Visit robvolk's Homepage  Reply with Quote
Could the one it doesn't work on be set to SQL 6.5 compatibility mode? ALTER COLUMN doesn't exist in 6.5 and earlier. You can check the compatibility level by running sp_dbcmptlevel. BEFORE YOU CHANGE THE COMPATIBILITY LEVEL, read Books Online thoroughly about it, so that you can see if there are any potential side effects you don't want.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000