?
Solved

Altering a Function that is used in a computed column

Posted on 2010-01-11
3
Medium Priority
?
302 Views
Last Modified: 2012-05-08
I have a question that I have never been asked by anyone before and wanted to get the experts answers here.

I have a table, and one of the columns is a computed column using a function.  Now it is time to change the function body to include more criteria, etc.  But because it is a function that is used in a computed column, SQL will not let me alter the function.

How is it that you can alter the function for new functionality for the computed column?
0
Comment
Question by:DBAduck - Ben Miller
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1600 total points
ID: 26285085
you will have to drop the computed column, change the function, recreate the computed column.
this might required to alter triggers, drop columns etc during that time ...
0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 400 total points
ID: 26285091
drop that computed column, modify the fnction and recreate the computed column using the modified function
0
 
LVL 25

Author Closing Comment

by:DBAduck - Ben Miller
ID: 31675582
Thanks
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question