Re: nested stored procs

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 09/30/04


Date: Thu, 30 Sep 2004 15:32:02 +0200


> I was hoping I did not have to trawl through my app to change the parameters
> passed to stored proc A

No need. The new parameter is an *optional* parameter, if you don't pass it, the procedure will
behave as it used to...

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Richard Wilde" <info@rippo.co.ukXXX> wrote in message news:eBKUlTupEHA.4076@TK2MSFTNGP12.phx.gbl...
> Thanks, I thought as much
>
> I was hoping I did not have to trawl through my app to change the parameters
> passed to stored proc A
>
> Richard
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote in
> message news:eLYRgQupEHA.896@TK2MSFTNGP12.phx.gbl...
> > You can't. You can pass an optional parameter from the outer proc and the
> > inner proc will use that
> > parameter to determine whether to do the SELECT. Or pass the value out as
> > an OUT parameter instead
> > of doing a SELECT....
> >
> > -- 
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Richard Wilde" <info@rippo.co.ukXXX> wrote in message
> > news:use$9IupEHA.868@TK2MSFTNGP10.phx.gbl...
> >> I have a stored procedure A which performs a few inserts and outputs an
> >> select @@identity as id
> >>
> >> I have a stored procedure B which calls stores procedure A
> >>
> >> However I want to suppress the ouput of stored procedure A inside stored
> >> procedure B. I tried using
> >>
> >> set nocount on
> >>
> >> but this only suppresses the insert confirmations
> >>
> >> how do can I do it?
> >>
> >> PROC B
> >>     set nocount on
> >>     exec stored A
> >>     set nocount off
> >>
> >>
> >
> >
>
>


Relevant Pages

  • Persistent Schema-Stability (Sch-S) Locks
    ... locks on this table that linger and stay locked for an extended period ... Locks/Objects view always shows one stored procedure in particular. ... As soon as I kill the process with the Sch-S lock then the CPU usage ... If the "Last TSQL Command Batch" shows this stored proc name all the ...
    (microsoft.public.sqlserver.programming)
  • RE: EXEC Stored Procedure does not work in SSIS task
    ... Your original version had a proc that, before it could do it thing, had to ... Result Set page to map the return to Variables in the SSIS Package. ... Set up your Source adapter and put in your command as: ... The stored procedure sp_GetTrafficData executes another stored procedure the ...
    (microsoft.public.sqlserver.dts)
  • Re: Auditing SP Execute.
    ... As long as the users only have execute permissions on the proc i.e. they ... This assumes that the app doesn't use a single service ... > the stored procedure from enterprise manager or query analyser (others ...
    (microsoft.public.sqlserver.security)
  • Stored proc issue... Best parameter type to use?
    ... I currently have a stored procedure that performs a user-selected operation ... RowID INTEGER, ... The stored proc is transactional, ...
    (microsoft.public.sqlserver.programming)
  • RE: parameter name problem
    ... stored procedure positionally. ... if you have a proc with two parameters you can call it as: ... > sql server and in oracle it is a simple string, ...
    (microsoft.public.sqlserver.programming)