what does return from a CRUD store procedure

  • Hello everybody i need help.

    I have a store procedure to make a CRUD to a table.

    My question is about of how must i return the data when is just a data or

    when is a set of data.

    Is like dynamic return, i don´t know, i hope be clear.

    thanks a lot

    fausto

  • I'm not clear on what you want to do. Can you provide an example of what you want your SP to return given a specific input?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • ok, basically i have a store procedure and it receive some parameters, ok.

    Now i have 4 IF's, and in everyone have Insert, Select, Delete ....

    and for example if the parameter iNPUT '@pstrOpcion' is LIS, the stored procedure must return

    a resulset.

    If the parameter INPUT '@pstrOpcion' is INS, the stored procedure must return the Id inserted.

    Is clear ?

    Thanks a lot men.

    fausto

  • Yep, that's clear. I understand what your stored procedure is trying to do. What I'm unclear on is what you are wanting help with. What is your current SP doing that is not meeting your expectations?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • ok, i understand you.

    I have poor experience in sql server, so i want to know

    if my stored procedure works?

    Because i have a doubt about how to return sometimes a Int(insert) data and

    sometimes return a resulset (Select)

    and if the store procedure do that?

    thanks

Viewing 5 posts - 1 through 4 (of 4 total)

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