Stored procedures within cursor

  • Hi,

    I have a cursor declared for some columns from a table. The values of the cursor is the input paramater of the stored procedure.

    I need to include another stored procedure which takes a different combination from the cursor.

    Eg:

    open cur

    Fetch

    @name

    @id

    Exec SP1 @name, @id -- @name = 'Ab01'

    EXEC SP2 @name, @id -- @name = 'ka01'

    How to include the 2 SP's with conditions on @name value?

  • It looks, from your example, like @name is supposed to have two different values. Is that what you're trying to accomplish?

    - 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

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

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