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
Rodney Johnson
NA
80
0
datepart/datename
Oct 10 2011 6:57 PM
Hello,
I have a table containing the following columns
TrailerID
ScheduleDate
ActualDate
AcutalCube
I would like to pull the trailerID if the day of the week is, say Tuesday. I have found I can get the day of the week for a specific row using datepart, however I would like to pull all rows for a given day of the week. I have tried the following
select * from summary where datepart(dw, ' ') = '5'. (the name of the table is "summary".)
The query executes successfully with 0 rows. The results of the query are to be pulled into C# and then put into a structure for further manipulation. If I can avoid pulling all of the rows in sql then altering it in C# to only those I want that would be wonderful.
Reply
Answers (
3
)
Unique Constraint in SQL
Problem in room search