i create a Table valued userdefined function in sqlserver,,
in the table two columns inserted ,,
iwant to call a a One colum within a select statemet
.....
I eant this mode answer
my fuction name is Balance
My table is @Table (Dr,Cr)
i call the function
Select Dr from dbo.balance
This query gives correct answer,,,,
but i want to Select
Select Dr from dbo.balance,Select Cr from dbo.balance ?
is this possible at select statement?
Call user defined Function within select Statement
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Anil KumarRank #367 · 6.8K reputationPosted May 31, 2012, 10:17 PM EDT
The syntax is like -
SELECT mycolName1, myColName2,....
FROM [dbo].[myFunctionNameWhichReturnTableResultSet] (myParameterValue)
But this type of function makes performance issues. So you should aware about this and go for alternates.