高分求救:调试存储过程中出现 [Microsoft][ODBC SQL Server Driver]对于造型说明无效的字符值
CREATE PROCEDURE sp_DEPOSIT_GETFIRST2
@p_indate datetime --传进来的日期
AS
insert into deposit_first2 select pointnum,cdate,sum(savingremain),sum(seasonavg),sum(yearavg) from deposit_first
where CONVERT(varchar(12) ,cdate, 112 )=CONVERT(varchar(12) ,@p_indate, 112 ) group by pointnum,cdate
commit
GO
上面是我写的代码,不知道什么原因,请各位大哥大姐帮忙,重谢
[解决办法]
--try
select pointnum,cdate,sum(savingremain),sum(seasonavg),sum(yearavg)
from deposit_first
where CONVERT(varchar(8) ,cdate, 112 )=CONVERT(varchar(8) ,@p_indate, 112 )
group by pointnum,cdate
[解决办法]
楼主把问题讲明白一些`.`