问题
I have a SQL CLR function which at the moment returns a string seperated by a comma.
How would I code the statement to return two new columns into my resultset.
For example
Select A, B, MyCLRFunction(X,Y) C From MyTable
Returns:-
One Two Three,Four
Five Six Seven,Eight
I would want it to return :-
One Two Three Four
Five Six Seven Eight
回答1:
You will need to convert your CLR function from scalar- to table-valued to allow it to return more than one column.
see the MSDN entry on CLR TVF
It's not possible to provide a more detailed answer without more information in the question.
来源:https://stackoverflow.com/questions/10447020/sql-clr-return-two-new-columns