I have a table called tblOptions with lots of columns in. There is only one row.
If at all possible, I am looking to write a generic scalar-valued function that returns the value of one column in the above mentioned table. The column name will be passed into the function as a parameter.
I would like to avoid having to have a CASE statement in the function as this will require maintenance.
I am looking to use this function for column defaults when creating tables as I'd rather that approach than triggers.
Is this possible?