Function return two variables

  • Hello,

    is it possible create a function that return two variables without use Table-valued Function?

    thanks...

  • As far as I know, the answer is No. If you don't want a table-valued function then you're left with only the scalar function and it only allows a single value.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Yes, the answer is No.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • A workaround can be to concatenate the two values into a binary string or varchar, and then later split the values in the SELECT statement.


    N 56°04'39.16"
    E 12°55'05.25"

  • You could try a stored proc with two OUTPUT parameters.

  • Could a UDT be used in this case?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply