December 2, 2006 at 7:46 pm
I was just wondering if the syntax for defining a table valued function allows for the function to return two different table schemas depending on the input... does anyone know if this is allowed/possible?
Thanks,
Paul
December 2, 2006 at 8:33 pm
I don't think it is possible.
MohammedU
Microsoft SQL Server MVP
December 3, 2006 at 11:16 am
Not 100% sure. But I'm 99.999999999999% sure it can't be done at the moment or ever for that matter.
What problem are you trying to solve with this solution?
December 4, 2006 at 10:42 am
Thanks for the replies.
I just want to know if I can assume the fields are going to be the same for table-valued functions because in one part of my UI all I need are the field names (not their values) and I want to delay binding the function to a parameter until later in the application.
Paul
December 4, 2006 at 10:53 am
SET FMTONLY ON
GO
SELECT * FROM dbo.FnName ('Dummy value')
GO
SET FMTONLY OFF
This will return the column names only without executing the Query.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply