I need to create a Db function that returns a list of GUID, but from different tables.
So I'm trying to create a db function, that get as input the name of the table, and return a list (table with only one field), but since I cannot use dynamic sql all I tried doesn't work.
How can I do that? Every db function I tried to create, doesn't even pass the "syntax" check, and now I'm stuck.
1条答案
按热度按时间hrysbysz1#
This is just a procedure and I specified the code field and all the values are returned without where The input must include the name of the table and the schema, separated by a comma I cannot use EXEC in functions, I had to use stored procedures