CREATE PROCEDURE [dbo].[VIEW_REPORTS]
@BRC_START_DATE datetime,
@BRC_END_DATE datetime,
@Hild_Branch varchar(50),
@REPORTSIZE int,
@RPT_REPORT_NAME varchar(10),
@USER_ID INT,
@ReportType_Code nvarchar(50)
AS
declare @MonthFirstdate as varchar(50)
declare @Month as varchar(50)
Declare @Year as varchar(50)
set @year =year(@BRC_END_DATE);
set @Month='';
if MONTH(@BRC_END_DATE)<10
begin
set @Month= '0' + month(@BRC_END_DATE);
set @MonthFirstdate=...