stored procedure parameters

  • i wanted to create a procedure like below with the parameters specified. i would like

    to give the user a range if needed but if its just for one day than only one number could be entered and than default whatever the start is to the end. Is this possible?

    create procedure test

    @start int,

    @end int default @start

  • Do it like this,

    Create Procedure test

    @start int,

    @end int = NULL

    Begin

    if @end is Null

    @end = @start

    Remainder of sp ...

    Hope this helps

    Phill Carter

    --------------------

    Colt 45 - the original point and click interface

    --------------------
    Colt 45 - the original point and click interface

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

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