Tracy
Check the compatibility level of your database:
exec sp_dbcmptlevel <database_name>
will tell you.
If you are in 6.5 level, ALTER COLUMN is not allowed.
Change it to 70 or 80 (PLEASE make sure you state your version in future
posts)
with the following
exec sp_dbcmptlevel <database_name>, 70
If by some chance you are actually using 6.5, the above procedure is not
available and neither is the ALTER COLUMN syntax.
Enterprise Manager is able to do it by completely dropping and rebuilding
the table behind the scenes.
HTH
--
-------------------------------------
Kalen Delaney
MCSE, SQL Server MCT, MVP
www.InsideSQLServer.com
Feed Someone for Free Today!
www.thehungersite.com
ALTER TABLE [dbo].[ecm] ALTER COLUMN [part_id] [varchar] (30) NOT NULL
I am having a problem on the above statement in our production environment.
This
same statement worked correctly in our development and test environments,
but
failed in the production environment. The error message is Server: Msg 170,
Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'COLUMN'.
Before attempting to run the command I dropped the indexes and constraints
on the
table. The owner is correct.
Does anyone have any ideas? I was able to make the change through
enterprise
manager on the production box.
Thanks!!