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
abhishek srivastava
NA
2
0
Fetching Records with Date Comparision
Apr 6 2011 8:07 AM
Hi friends,
I have a table 'Medicine'
id name expirydate
1A 04-06-2011 17:00:00
2B 04-06-2011 23:57:57
3C 04-06-2011 01:00:00
4D 04-05-2011 10:00:00
5E 04-07-2011 09:00:01
I want to find all medicine which expire on or before 04-06-2011.
select * from medicine where expirydate < getdate();
I fire this query on 04-06-2011 at 17:30:00
and got result
id name expirydate
1A 04-06-2011 17:00:00
3C 04-06-201101:00:00
4D 04-05-201110:00:00
it not contain record ID 2.
how can I find actual result which also contain record 2?
I can not use as 'expiryDate < getdate()+1'.
Thanks.
Reply
Answers (
1
)
Delete Multipal Record Query ?
how to execute a procedure,once any database is restored on the database server?