新手求助,存储过程,“错误 156 :在关键字‘ end ’附近有语法错误”
create procedure proc_calculate_taxes(
@FromDate datetime,
@ToDate datetime,
@XzqId int,
@StaticCol int,
@StaticWay int,
@Result varchar(255) output
)
as
begin
select @Result=sum(TB1.ZDBCZE) from TB1,TB2
where (TB1.CreateTime < @ToDate and TB1.CreateTime >= @FromDate)
and TB1.XmjlId = TB2.ID
and
(TB2.XzqId IN
(SELECT ID
FROM TB3
WHERE
(TB3.Path LIKE '%,'+@XzqId+',%'))
end