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
DOJ Date.
here DOJ datatype is date
so please suggest me how to call this query