Alter Table questions

  • Thread starter Thread starter Darin
  • Start date Start date
D

Darin

I have many columns in different tables set to money. I want to change
those to be decimal(18,2).

I do the following:

ALTER TABLE AROpenItem ALTER COLUMN copn_taxamt decimal(19,2)

I get an error:

The object 'DF__AROpenIte__copn___4D94879B' is dependent on column
'copn_taxamt'.


BUT

I can open SQL Server Enterprise manager, go to design table, and change
that column. It displays a message:

The following tables will be saved to your database. Do you want to
continue?
ARCustomer
AROpenItem

(AROpenItem references the customer # from ARCustomer).

I click Yes, and it changes the column fine.

How can I get the column to change from an alter table command? I drop
the foreign key constraint and still receive the object error from query
analyzer, but the enterprise manager doesn't display the table message.

Any ideas?


Darin
 
Hello,

Darin said:
I have many columns in different tables set to money. I want
to change those to be decimal(18,2).

I do the following:

ALTER TABLE AROpenItem ALTER COLUMN
copn_taxamt decimal(19,2)

I get an error:

The object 'DF__AROpenIte__copn___4D94879B' is
dependent on column 'copn_taxamt'.

This is a VB.NET language group. Notice that you will have a better
chance to get an answer if you post to the ADO.NET newsgroup in future:

news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet

Web interface:

http://msdn.microsoft.com/newsgroup...roup=microsoft.public.dotnet.framework.adonet
 
Hi Darin,

I've had similar difficult sql questions answered at
microsoft.public.sqlserver.server - some of the mvp's there are very
knowledgeable about sql. My guess is that some system sp's are at work when
you get it done inside sql server's table designer.

HTH,

Bernie
 
I didn't mean to post this question to this newsgroup. Just a whoops on
my part.
Sorry.

Darin
 
Back
Top