MS SQL Server 2008 Stored Procedure Result as Column Default Value
Posted
by user337501
on Stack Overflow
See other posts from Stack Overflow
or by user337501
Published on 2010-05-17T17:33:40Z
Indexed on
2010/05/17
17:40 UTC
Read the original article
Hit count: 267
First of all, thank you guys. You always know how to direct me when I cant even find the words to explain what the heck im trying to do.
The default values of the columns on a couple of my tables need to equal the result of some complicated calculations on other columns in other tables. My first thought is to simply have the column default value equal the result of a stored procedure. I would also have one or more of the parameters pulled from the columns in the calling table.
I don't know the syntax of how to do it though, and any time the word "stored" and "procedure" land next to each other in google I'm flooded with info on Parameter default values and nothing relating to what I actually want.
Half of that was more of a vent than a question...any ideas though? And plz plz dont say "Well, you could use an On-Insert Trigger to..."
© Stack Overflow or respective owner