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
Jon
NA
1
0
Selecting last response for multiple postings.
Jan 24 2007 10:41 PM
I am trying to query a data base for among other things the last response to a posting. The table containing the responses has response id's, post id's, responses, and date of response. So I tried
I can get the last overall response with
SELECT response FROM responses WHERE response_ID in (SELECT top 1 response_id FROM responses ORDER BY date_response DESC);
But I need the last response for each posting. And I need it to be efficient because this is actually part of a larger statement.
Reply
Answers (
3
)
StoredProcedures
Executer une requête sql à l'aide de C# qui retourne un seul enregistrement