views:

90

answers:

3

Hi all,

Does anyone know of a way to execute a stored procedure from within a stored procudure using some of the params passed in from the original procedure.

i.e. if i pass in params @id, @event date, @ log into sproc 1 then sproc 1 will do it's own stuff and pass in @log and @event_date to sproc 2.

Thanks!

+3  A: 

just call:

exec mysproc @param1 @param2

inside your sproc.

Spence
+2  A: 

Just execute the second sp the same way you would have from a query.

EXEC SPROC2 @LOG, @EVENT_DATE
John Saunders
+2  A: 

call exec with the parameters of interest:

  ... within sp_1
  ... other code
  exec sp_2 @log, @event_date
tpdi