Home Forums SQL Server 2005 Development Accessing data returned from a table valued function RE: Accessing data returned from a table valued function

  • Sean Lange (12/13/2012)


    This works for me.

    ...

    However the reason I suggested using a temp table is because you want to capture all the rows not just one. If you don't need multiple rows you should consider a complete rethinking of what you are doing. For that type of situation it would be better to use a stored proc with multiple output parameters instead of using a multi statement table valued function.

    Yep.

    That's also why I brought up (a) dealing with multiple rows, and (b) performance concerns with table-value UDFs.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon