• macbaze72 - Thursday, December 21, 2017 4:04 PM

    This code works, but I don;t understand it.  The part I need some clarification is on the Return @Severity. Why would that not be Return @StartDate?  As it is written it return the results of dbo.startdate(). ...
    Thanks
    Everett

    The RETURN value from any proc is always a single integer value.  This is intended to be the status of the proc, i.e., 0 if successful, something else if not.

    You don't need to, or want to, return OUTPUT parameters directly.  For one thing, you could have many OUTPUT parameters.  For another, SQL already "knows" it needs to return that value because of the "OUTPUT" designation.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.