[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

order by date: need a union (?)

Asked by Smoerble in Databases Miscellaneous

Tags: union

Hi all.
I have a database (MS Access file) from an existing forum. It works like this:
If someone starts a new topic, then a new entry is made in "FORUM_TOPICS".
If someone adds a reply to any topic, the reply is saved in "FORUM_REPLY".

Table "FORUM_TOPICS": ID ...
Table "FORUM_REPLY": ID, Topic_ID (as key to which topic this reply belongs)


What I want:
I want to have the latest 30 postings, no matter if a topic posting or a reply. So I need a way to sort the following SQL query by date, no matter if topic or reply.

----
SELECT TOP 30 FORUM_CATEGORY.CAT_NAME, FORUM_CATEGORY.CAT_ID, FORUM_CATEGORY.categoryHomepage, FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_STATUS, FORUM_FORUM.F_SUBJECT, FORUM_FORUM.F_PASSWORD_NEW, FORUM_FORUM.F_LAST_POST_AUTHOR, FORUM_FORUM.F_URL, FORUM_FORUM.forumHidden, FORUM_FORUM.forumSpecial, FORUM_FORUM.F_DESCRIPTION, FORUM_FORUM.F_TOPICS, FORUM_FORUM.F_COUNT, FORUM_FORUM.F_PRIVATEFORUMS, FORUM_FORUM.F_LAST_POST, FORUM_FORUM.F_TYPE, FORUM_FORUM.F_ORDER, FORUM_FORUM.forumLanguageId, FORUM_TOPICS.TOPIC_ID, FORUM_TOPICS.T_SUBJECT, FORUM_TOPICS.T_MESSAGE, FORUM_TOPICS.T_DATE, FORUM_TOPICS.T_unregisteredNick, FORUM_TOPICS.T_isSticky, FORUM_TOPICS.T_includeSignature, FORUM_TOPICS.klammLoseForPost AS T_klammLoseForPost, FORUM_REPLY.REPLY_ID, FORUM_REPLY.R_MESSAGE, FORUM_REPLY.R_DATE, FORUM_REPLY.R_unregisteredNick, FORUM_REPLY.R_includeSignature, FORUM_REPLY.klammLoseForPost AS R_klammLoseForPost, topicAuthor.MEMBER_ID AS topic_Member_ID, topicAuthor.M_NAME AS topic_M_NAME, topicAuthor.M_LEVEL AS topic_M_Level, topicAuthor.M_SIG AS topic_M_SIG, topicAuthor.M_DATE AS topic_M_DATE, topicAuthor.M_TITLE AS topic_M_TITLE, topicAuthor.M_avatarURL AS topic_M_avatarURL, topicAuthor.M_avatarID AS topic_M_avatarID, topicAuthor.memberTopics AS topic_memberTopics, topicAuthor.memberReplies AS topic_memberReplies, topicAuthor.memberExtraEPs AS topic_memberExtraEPs, topicAuthor.memberTotalEPs AS topic_memberTotalEPs, topicAuthor.memberMoney AS topic_memberMoney, topicAuthor.memberFeaturesPurchased AS topic_memberFeaturesPurchased, replyAuthor.MEMBER_ID AS reply_Member_ID, replyAuthor.M_NAME AS reply_M_NAME, replyAuthor.M_LEVEL AS reply_M_Level, replyAuthor.M_SIG AS reply_M_SIG, replyAuthor.M_DATE AS reply_M_DATE, replyAuthor.M_TITLE AS reply_M_TITLE, replyAuthor.M_avatarURL AS reply_M_avatarURL, replyAuthor.M_avatarID AS reply_M_avatarID, replyAuthor.memberTopics AS reply_memberTopics, replyAuthor.memberReplies AS reply_memberReplies, replyAuthor.memberExtraEPs AS reply_memberExtraEPs, replyAuthor.memberTotalEPs AS reply_memberTotalEPs, replyAuthor.memberMoney AS reply_memberMoney, replyAuthor.memberFeaturesPurchased AS reply_memberFeaturesPurchased
FROM ((FORUM_REPLY RIGHT JOIN (FORUM_TOPICS INNER JOIN (FORUM_CATEGORY INNER JOIN FORUM_FORUM ON FORUM_CATEGORY.CAT_ID = FORUM_FORUM.CAT_ID) ON FORUM_TOPICS.FORUM_ID = FORUM_FORUM.FORUM_ID) ON FORUM_REPLY.TOPIC_ID = FORUM_TOPICS.TOPIC_ID) LEFT JOIN FORUM_MEMBERS AS topicAuthor ON FORUM_TOPICS.T_AUTHOR = topicAuthor.MEMBER_ID) LEFT JOIN FORUM_MEMBERS AS replyAuthor ON FORUM_REPLY.R_AUTHOR = replyAuthor.MEMBER_ID
ORDER BY FORUM_REPLY.R_DATE DESC , FORUM_TOPICS.T_DATE DESC;
----


Can someone help?
[+][-]10/10/04 03:09 AM, ID: 12269680Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Databases Miscellaneous
Tags: union
Sign Up Now!
Solution Provided By: Zvika
Participating Experts: 3
Solution Grade: A
 
[+][-]10/08/04 11:39 PM, ID: 12265283Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/09/04 05:38 AM, ID: 12265925Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/09/04 05:47 AM, ID: 12265951Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/28/04 01:58 PM, ID: 12438516Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/28/04 11:59 PM, ID: 12441871Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/01/04 09:13 AM, ID: 12718205Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12/01/04 09:30 PM, ID: 12723311Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/02/04 01:43 AM, ID: 12724273Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92