SQL Server Performance

Passing variables between sp's

Discussion in 'T-SQL Performance Tuning for Developers' started by jameswood, Nov 7, 2002.

  1. jameswood New Member

    So I'm doing a select in one stored procedure and trying to pass a parameter from the one into the other.

    CREATE PROCEDURE usp_select_for_class_code
    @numberList int output
    AS

    SELECT @numberList = waco_dir_class
    FROM agcwa_membership
    execute usp_classCode

    But I keep getting told that

    Procedure 'usp_select_for_class_code' expects parameter '@numberList', which was not supplied.

    Any help please
  2. satya Moderator

    From the code its correct the execution would be 'Exec usp_select_for_class_code 20'. Refer to books online about stored procedures for information.

    HTH

    Satya SKJ

Share This Page