I'm trying to do something like this:
ALTER TABLE [tablename] ALTER COLUMN [fieldID] int;
I've tried several versions of this, and the data type is never changed from
numeric. I have removed all indexes on the table and it still doesn't work,
no error messages or anything. I am trying to do this with script because I
have to change like 150 databases and it's part of a much bigger script that
I have to do the same thing on other tables and columns. Any ideas?
thanks,
CoryPerhaps you are altering some other table. Have you checked the owner of the
table? Or, better yet,
owner-qualify the ALTER statement.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Cory Harrison" <charrison@.csiweb.com> wrote in message
news:Ob$zDhUNFHA.3192@.TK2MSFTNGP10.phx.gbl...
> I'm trying to do something like this:
> ALTER TABLE [tablename] ALTER COLUMN [fieldID] int;
> I've tried several versions of this, and the data type is never changed fr
om numeric. I have
> removed all indexes on the table and it still doesn't work, no error messa
ges or anything. I am
> trying to do this with script because I have to change like 150 databases
and it's part of a much
> bigger script that I have to do the same thing on other tables and columns
. Any ideas?
>
> thanks,
> Cory
>
>|||No error messages -- are you sure it's not working? What do you see when
you run sp_help 'tablename' ?
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"Cory Harrison" <charrison@.csiweb.com> wrote in message
news:Ob$zDhUNFHA.3192@.TK2MSFTNGP10.phx.gbl...
> I'm trying to do something like this:
> ALTER TABLE [tablename] ALTER COLUMN [fieldID] int;
> I've tried several versions of this, and the data type is never changed
from
> numeric. I have removed all indexes on the table and it still doesn't
work,
> no error messages or anything. I am trying to do this with script because
I
> have to change like 150 databases and it's part of a much bigger script
that
> I have to do the same thing on other tables and columns. Any ideas?
>
> thanks,
> Cory
>
>|||Wow, you're right, running sp_help does show that it was converted from
numeric to int. I have been looking at it through Enterprise Manager. I
can run the script then look at the design view for the table and it is
unchanged even after closing everything out, refreshing everything, and
trying again. I am becoming more and more agitated with Enterprise Manager
by the day.
thank you,
Cory
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:%23j3gApUNFHA.2544@.TK2MSFTNGP10.phx.gbl...
> No error messages -- are you sure it's not working? What do you see when
> you run sp_help 'tablename' ?
>
> --
> Adam Machanic
> SQL Server MVP
> http://www.datamanipulation.net
> --
>
> "Cory Harrison" <charrison@.csiweb.com> wrote in message
> news:Ob$zDhUNFHA.3192@.TK2MSFTNGP10.phx.gbl...
> from
> work,
> I
> that
>|||> trying again. I am becoming more and more agitated with Enterprise
Manager
> by the day.
And you haven't even read http://www.aspfaq.com/2455 yet...
|
No comments:
Post a Comment