DECLARE @BeginTime AS DATETIME
DECLARE @EndTime AS DATETIME
DECLARE @Hour AS INT
DECLARE @Min AS INT
SET @Min = DATEPART(Minute GETDATE())
IF @Min <
BEGIN
SET @BeginTime = CONVERT(VARCHAR() GETDATE() ) + + CAST(DATEPART(Hour GETDATE()) AS VARCHAR) + :
SET @EndTime = CONVERT(VARCHAR() GETDATE() ) + + CAST(DATEPART(Hour GETDATE()) AS VARCHAR) + :
SET @BeginTime = DATEADD(Hour @BeginTime)
END
ELSE
BEGIN
SET @BeginTime = CONVERT(VARCHAR() GETDATE() ) + + CAST(DATEPART(Hour GETDATE()) AS VARCHAR) + :
SET @EndTime = CONVERT(VARCHAR() GETDATE() ) + + CAST(DATEPART(Hour GETDATE()) AS VARCHAR) + :
END
EXEC up_GenReport @BeginTime @EndTime