How to Set value from another sp in SQL

  • Hi All,

    I am trying to write an SP but stucked. in a situation I am trying to set sub_serial_no and for that I have written

    SET @sub_serial_no = (exec GetSubmissionSerialNumber 1)

    if I execute only exec GetSubmissionSerialNumber 1 then I am getting the value but when I run the above sp it shows me.

    I want to set @sub_serial_no by calling the earlier sp (GetSubmissionSerialNumber)

    How do I set that?

    Please help!!

  • Read this: http://msdn.microsoft.com/en-gb/library/ms187004(v=sql.105).aspx

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

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • The recommended method for returning a single value from a stored procedure is to use an output parameter. Which I'm sure is what the link provided in the previous post points to.

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

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