If I have a calculated field that returns a value from a udf, does that
field get calculated even when it's not being used in a Select statement? I
knw that if a calculated field's formula is based on fields in the same
record that the calculation is only performed when one of the two fields is
updated. But if I'm calling a UDF, there's no way for SQL Server to know
when to update the calculation. (In this case, the UDF does a count of
records in a child table based on criteria - not an aggregate) Of course if
the calculated field is in a select statement, it will be refreshed. But
what if I'm not calling that field in a query? Is it recalculated? The
bottom line is: How much overhead is there when I use a calculated field to
call a UDF?
Thanks.
--
Matthew.Wells
Ma***********@F irstByte.net