Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to alter formula field

Status
Not open for further replies.

tppradeep18

Programmer
Aug 8, 2000
20
IN
HI all,

I would like to know how can I alter the forumula field in a table using ALTER TABLE statment. I already have a formula in the field. I only need to change to some other forumla.

I DO NOT want to do it from enterprise manager

thanks
pradeep_TP
 
Formula" is actually computed column.

Only fundamental column properties can be altered (NULL/scale/prec). Definition of computed columns - not. You have two options:

- drop old computed column, add new (ALTER TABLE <table> ADD <column> AS <formula>). This will put "modified" column at the end though.
- do what EM already does (copy to temp table, drop & rename, rebuild indexes & constraints).

------
heisenbug: A bug that disappears or alters its behavior when one attempts to probe or isolate it
schroedinbug: A bug that doesn't appear until someone reads source code and realizes it never should have worked, at which point the program promptly stops working for everybody until fixed.

[ba
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top