How can the function be used in MS SQL.I have afunction which retruns value & date.I would like to use this to fetch records which I do in Oracle.I am not sure how this can be done in MS SQL
Its like this
Select [Company Name],Patient,Visit,[Visit Date],[Insurance Company],
InsPolicyVal(A.Visit) -- this is the function which should return value
from [Medical Visit] A ON H.Patient = A.Patient INNER JOIN
[Payment Policies] C ON A.[Insurance Policy] = C.Policy INNER JOIN
[Medical Policy Link] D ON C.EmployerInsuranceLink = D.ID INNER JOIN
dbo.[Insurance Companies] E ON D.[Insurance Company ID] = E.[Insurance Company]
the InsPolicyVal is the function which should retrun the insurance value for a specific visit.
I have tried using Outer join but the out does not seem to be correct.
Please if some one can help.