RRinTetons
IS-IT--Management
Excel 2007SQL
Server 2005
I have a udf in SQL Server that returns a decimal(16,2) value. It takes 5 arguments. I want to get that value into a cell in an Excel worksheet using cell references as the arguments.
I can work with SQL Server through queries that return a recordset, but in this case I just want the single value, as if it were coming back from an Excel function.
I'm guessing there is a way to wrap the udf from SQL Server in a VBA function, but all I can find in references is how to get back a table. I thought that maybe I could treat the return value of the function as a 1 x 1 table, but that doesn't seem to work.
Any help on this?
-
Richard Ray
Jackson Hole Mountain Resort
Server 2005
I have a udf in SQL Server that returns a decimal(16,2) value. It takes 5 arguments. I want to get that value into a cell in an Excel worksheet using cell references as the arguments.
I can work with SQL Server through queries that return a recordset, but in this case I just want the single value, as if it were coming back from an Excel function.
I'm guessing there is a way to wrap the udf from SQL Server in a VBA function, but all I can find in references is how to get back a table. I thought that maybe I could treat the return value of the function as a 1 x 1 table, but that doesn't seem to work.
Any help on this?
-
Richard Ray
Jackson Hole Mountain Resort