Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-06-14 : 07:22:24
|
| user writes "I have three tables like tblcategory,tblforum,tbltopic tblcategory contains all the categoriestblforum contains forums under the categories.tbltopic contains topics under the forums.I want to display all topics based on forums and categories.i need stored procedure for thatmy tables aretblcategory----------Cat_ID cat_nameCat_order tblforum--------Forum_IDCat_idForum_OrderForum_nameForum_descriptionDate_Started....tbltopic---------Topic_IDForum_IDSubjectStart_dateLast_entry_date..." |
|
|
JasonGoff
Posting Yak Master
158 Posts |
Posted - 2004-06-14 : 07:40:29
|
| Not sure exactly what you're looking for, but the SQL below will give Category Name,Forum Name,subjectfor all categories,forums etc.SELECT cat_name, forum_name, subjectfrom tblcategory cinner join tblforum f on c.cat_id=f.cat_idinner join tbltopic t on t.forum_id=f.forumidsort by cat_order,forum_order |
 |
|
|
|
|
|