|
Is it possible to use a Stored Procedure in a computed column? I have an INTEGER column that I want to fill using a SP that returns an INTEGER. The SP works if I run it from the command line, but when I use it as a computed column, the column ends up storing garbage. I am using (CALL lifetime(sdate,edate,'TOT')) as the computer column definition. sdate and edate are columns in the table that occur (and are populated) before the computed column, and 'TOT' is a valid value for the SP. If I change the column to be non computed, and add the SP call to my INSERT INTO command (INSERT INTO mytable (sdate,edate,tot_life) VALUES (10/16/2012,10/17/2012,(CALL LIFETIME('10/16/2012','10/17/2012','TOT'))), the correct value is put in the tot_life column. Thanks, Jason -- Jason Kramer University Archives and Records Management 002 Pearson Hall (302) 831 - 3127 (voice) (302) 831 - 6903 (fax) |

