November 7, 2005 at 9:44 am
I have a script that produces dynamic SQL and attempts to change the collation of the columns on a table by using the "ALTER TABLE . . .ALTER COLUMN" statement. In BOL, it says that a column that is of "text" data type can be changed, but when I execute the script, I get an error that states: "Cannot alter column 'XYZ' because it is 'text'." This column does not meet any of the constraints of not being able to do this.
Please advise...
November 7, 2005 at 9:49 am
What version of SQL are you using? Which BOL are you using to gather your information? If you are using 2K5 and the 2K BOL that could be a problem. Also, if using 2K5 this may be something that has changed or is not currently functional in your release...
Good Hunting!
AJ Ahrens
webmaster@kritter.net
November 7, 2005 at 10:49 am
SQL Server 2000
BOL 5.2.3790.309
November 8, 2005 at 5:51 am
Post up your whole script.
Note that:
ALTER COLUMN cannot have a collation change if any of the following conditions apply:
If a check constraint, foreign key constraint, or computed columns reference the column changed.
If any index, statistics, or full-text index are created on the column. Statistics created automatically on the column changed will be dropped if the column collation is altered.
If a SCHEMABOUND view or function references the column.
November 8, 2005 at 6:00 am
Right. That is in BOL. As I stated in the original thread, "The column does not meet any of the constraints of NOT being able to do this." I can do it through Ent. Mgr. but not Query Analyzer.
Thanks
November 8, 2005 at 8:45 am
Sorry to nitpick, but if it's a SQL2000, question, why post it in the SQL 2005 forum ? It just adds to the confusion ?
November 8, 2005 at 8:57 am
Because we are upgrading to 2005.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply