TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prasad Bhagat
NA
516
234.8k
how to cal a datetime colum with int values
Jun 23 2015 6:19 AM
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
Reply
Answers (
4
)
Select dates between two dates using isnull function
for creation fof database