日期:2014-05-17 浏览次数:20688 次
ALTER PROCEDURE CountOrderRORInMonth
@OrderId varchar(100) = null,
@year int = null,
@month int =null
AS
BEGIN
PRINT '@OrderId is:'+CONVERT(varchar, @OrderId);
PRINT '@year is:'+CONVERT(varchar, @year);
PRINT '@month is:'+CONVERT(varchar, @month);
Set DateFormat YMD;
DECLARE @temp varchar,@beginROR datetime,@endROR datetime;
SELECT @temp=(CONVERT(varchar, @year)+'-' + CONVERT(varchar, @month) +'-1');
PRINT '@temp is:'+CONVERT(varchar, @temp);
--SELECT @beginROR=@temp;
--SET @beginROR=CAST(@temp AS datetime);
--PRINT '@beginROR is:'+CONVERT(varchar, @beginROR);
END
SELECT CONVERT(varchar, 2013)+'-' + CONVERT(varchar, 3) +'-1'