GetChild()是我自定义的函数,有一个输入参数
下列语句 select No_Hospital from GetChild('10001') 就是正确的,但是如果我写成这样子就提示有错误:
select No_Hospital from GetChild(select choscode from SysDictHospital where No_Hospital= 10005)
请各位帮忙看一下,O(∩_∩)O~
那样的话你应把子句 select choscode from SysDictHospital where No_Hospital= 10005 先exec出来一个值,然后再给函数调用
函数不支持execute,可以稍微修改下改用存储过程
那样的话调用方式基本也没什么不同
直接用存储过程吧