• Hi!

    Can I ask how to do that???

    I want to pass a column name as parameter to a function from within a select statement. Something interesting is that my function is a tvf... Meaning that I would have to use a second SELECT in order to specify what field I want to retrieve from the function. Here's an example:

    SELECT fname, lname, SELECT totalincome FROM dbo.CalculateIncome(PersonID) as Income FROM Persons

    This is just an example... I can do this with UDF that return a scalar value, I suppose it's because I don't have to use another select statement...

    Is this really posible???

    Thanks in advance.