Dear all,
i have a procedure like bellow,
CREATE PROC USP_ABC
@month int,
@year int ,
as
begin
select * from tbl
where
(@month=0 or (SELECT DATEPART(MM, DOJ) FROM dbo.tbl_param_employee_master as month)= @month)and
(@year=0 or (SELECT DATEPART(yy, DOJ) FROM dbo.tbl_param_employee_master as year)= @year)
END
(@year=0 or (SELECT DATEPART(yy, DOJ) FROM dbo.tbl_param_employee_master as year)= @year)
END
DOJ Date.
here DOJ datatype is date
so please suggest me how to call this query

Pankaj Kumar ChoudharyPosted Jun 23, 2015, 8:00 AM
END
Saroj Kumar SahuPosted Jun 23, 2015, 7:15 AM
Prasad BhagatPosted Jun 23, 2015, 6:51 AM
Saroj Kumar SahuPosted Jun 23, 2015, 6:46 AM