SQL CLR return two new columns

廉价感情. 提交于 2019-12-11 20:39:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!