.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

in forum creation to count the no. of replies

Posted By: krithiga     Posted Date: January 28, 2011    Points:2   Category :ASP.Net
i wish to know how to count the number of replies
it is a question table
select * from question

title question user posteddate id replies

network difference between anu 12/27/2010 1 null
hub and switch

booting in my laptop it was nandhu 1/10/2011 2 NULL
process automatically restart
failes how to solve this

network authorisation bala 11/10/2011 3 NULL
security and

cd drive cd is jammed kiran 13/10/2011 4 NULL
in drive
wat is the problem
i updated the replies in reply table and the question id is added to the answers how to count the number of replies

select * from replies

sender touser title answer date id

krithi anu network hub:easy ways to connect 12/28/2010 1
computers in small
router: a router is as a
computer that can be
programmed to understand,
malar nandhu booting Hai,long press the 2/10/2011 2
process and select the safe mode
and select the safe mode

krithi nandhu booting using safe mode to avoid this 2/10/2011 2
process problem any troubleshooting
problem occured

Author: Amit Mehra             
Posted Date: January 30, 2011     Points: 5   


You can write the sub query to find the no of replies like this

select ForumQuestionId, Forum Thread, Select count(*) from <forumresponse table> where forumThreadId = forumthreadCOlumn) as 'NoOfresponse' from <ForumMainTable>;

Hope this helps

Please "Mark As Answer " if this post help you.

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend