Is it possible to call a function with a dynamic name in SQL?
For example:
SELECT functionid, (SELECT results FROM dbo.Function_*functionid*) AS results
FROM List_of_Functions
This would call a different function for every row in the table List_of_Functions.
Or am I going about this all wrong?
You will need to build (either type it in, or build it dynamically based on your table) a SQL statement like:
Instead of building all those functions, wouldn’t it be better to build one function, and pass in a value that the function can use to differentiate the processing? like: