Call a stored procedure
- Last UpdatedJul 22, 2024
- 1 minute read
Call a stored procedure using the EXECUTE statement.
EXECUTE sp_AlarmCounter @StartDate=’2007-01-01’, @EndDate=’2007-03-31’, @Tagname = ’tag1’, @Type = ’LO’, @Provider = ’WW21353\InTouch’, @Comment = ’SSAADD’
In this example, the StartDate and EndDate parameters are required. The remaining parameters are optional. If you do not provide a value for a parameter, it is not used to filter the result set.
If a stored procedure includes a date/time variable, you can use any valid format specified in the SQL Server documentation.