I have scalar function which takes an integer as argument and return an integer too. I was trying to use this function by passing a parameter as a select statement which looks like :
select dbo.scalarFunc(select si.ID from table1 si where version = 9)
It would not let me do it. I tried cast but still did not work. Can anyone tell me if I can use select inside like this or not?