472,124 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,124 software developers and data experts.

Alter Table questions

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
3 4008
Hello,

"Darin" <darin_nospam@nospamever> schrieb:
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/microsof...amework.adonet

Web interface:

http://msdn.microsoft.com/newsgroups...amework.adonet

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
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

"Darin" <darin_nospam@nospamever> wrote in message
news:eR*************@TK2MSFTNGP12.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #3
I didn't mean to post this question to this newsgroup. Just a whoops on
my part.
Sorry.

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dylan Nicholson | last post: by
reply views Thread by Gianfranco | last post: by
2 posts views Thread by RamaKrishna Narla | last post: by
7 posts views Thread by Serge Rielau | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.