我已经使用两个输入参数和两个输出参数成功创建了一个存储过程.当我执行这个程序时,我收到一个错误
' - '附近的语法不正确
靠近第一个参数.
ALTER PROCEDURE [dbo].[Agent_interactions_report]
(
@StartDate date,
@EndDate date,
@ERRORCODE AS INT OUTPUT,
@ERRORDESCRIPTION AS VARCHAR(4000) OUTPUT
)
AS
BEGIN
SET NOCOUNT ON;
begin Try
select
cast([CallStartTime] as Date) as Date,
[AgentID] as [Agent ID], [Agent_Name] as [Agent name],
[CustomerID] as [Cust-ID], [Account_Number] as [Account number],
[Transaction_Des] as [Transaction],
CallStartTime AS [Call start time],
CallEndTime AS [Call end time], CallID as [Call ID]
from
[TBL_AGENT_TRANSACTIONS]
where
cast(CallStartTime as DATE) >= @StartDate
and cast(CallEndTime as Date) <= …Run Code Online (Sandbox Code Playgroud)