Wednesday, July 8, 2009

Syntax to execute a Stored Procedure in query window

exec [stored procedure name] parameter1_value, parameter2_value


For example if you have a stored procedure with @Facility, @StartDate, and @EndDate parameters then:


exec
[dbo].[s_PROCEDURE_Name] 'SHRB','01-01-2009','01-31-2009'

No comments:

Post a Comment