I have 2 User defined functions. Both are very similar in that they receive 2 parameters and fetch data from a linked server.
The only differnce in them is that 1 function is used in a select statement (i.e. select col1, col2, dbo.fn('param1', 'param2')
from table1 inner join table 2
The other is used all by itself (i.e. select dbo.function)
I have ran the select statement that is inside the function, outside in query analyzer and it returns data, however when I run the first one as in a select statement like above it works, but the 2nd one runs, but does not return any data.
Does anyone know what the problem may be?