SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

AskSQLTeam
Ask SQLTeam Question

USA
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)"

robvolk
Most Valuable Yak

USA
15676 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  
 New 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.06 seconds. Powered By: Snitz Forums 2000