Joining Stored Procs Datasets

  • I wanted to know if there was any way to execute two stored procedures and join the resultant datasets of stored procedures.

    In a way I want to know if there is any way to join two stored procedures without creating temp tables & another stored procedure that would execute and store the resultant data sets.

    Any advice would be appreciated.

    Thanks

  • Take a look at OpenRowset, OpenDatasource, and OpenQuery in Books Online. There are ways to use those to query a proc result-set as if it were a table.

    - 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

  • Keep in mind that unless those datasets are REALLY small, changes are fairly good that they will be turned into Worktables anyway, so you don't ever completely get away from having a temp table of one kind out there.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 3 posts - 1 through 2 (of 2 total)

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