lists and procedures

  • Ok, i've searched through the forum archives and I came up with some results but nothing that seemed like it would work so, here we go.

    I'm trying to send several results to multiple stored procs. here's a quick(syntactally incorrect) example:

    select id from reps

    where id in

    (dbo.mystoredproc id,parameter2)

    Essentially what i will be doing is nesting these here's another example:

    (GetPastSeminars(mydate) ->

    GetSeminarAttendance(seminar)->

    UpdateAttendance(person)

    I won't be getting that many results from my GetPastSeminars, 3 or 4 at most but GetSeminarAttendance will return between 10-40 records.

    I'm kinda stuck here.

  • Your probably best using functions that can return tables.

    select *

    from table

    where id in (select * from dbo.myfunction(@parameter))

    Simon Sabin

    Co-author of SQL Server 2000 XML Distilled

    http://www.amazon.co.uk/exec/obidos/ASIN/1904347088


    Simon Sabin
    SQL Server MVP

    http://sqlblogcasts.com/blogs/simons

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

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