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
Jeff C
NA
9
0
Fetch records from sql on basis of datetime.
Jun 5 2010 12:48 AM
Hello,
I am attempting to do a query with the following:
I have a table called callstats, it has 2 columns I'm interested in: OfferTime & AnswerTime. The data contained in them is in the format dd/mm/yyyy hh:mm:ss
Offertime always has a data in it, but sometimes AnswerTime can be empty.
The table itself has a year's worth of data.
I want a query that will give me whatever month's worth I query, I've tried several variations of the following to get a month's worth and nothing
"SELECT OfferTime, AnswerTime FROM callstats WHERE OfferTime LIKE '%Jan%' AND AnswerTime LIKE '%'"
This isn't returning any results. Basically I'm interested in entries for both columns, I want it to check the first column, if it's Jan, then read it and the 2nd column regardless if it's got data in it or not.
Thanks in advance.
Reply
Answers (
5
)
need help about sql database
Transaction limit on one record