http://groups.yahoo.com/group/SQLQueriesNoCode/
will probably help join and ask there. Some major SQL/Query experts there.

On 12/6/05, alex callard <[EMAIL PROTECTED]> wrote:
>
>  Hello - I have built a set of message boards.  I need to be able to show
> the number of responses to each thread from the main discussion board window
> - this i have done by using a SELECT COUNT(1) statement grouping the counts
> by messageThread so I use two recordsets - one for the count one for the
> messages that are both ordered/grouped in the same way.  this was great
> until I needed to do further filtering of the messages - I am building for a
> school and people can post messages to primary secondary or whole -
>   how could I write one recordset that includes a count as well as the
> data that i was pulling using two:
>
>   statement to get the messages the where clause changes according to
> where you work:
>
>   SELECT postedBy, messageThread, messageDate, section  FROM
> tbl_messageboard  WHERE messageState='parent' AND (section='" +
> Replace(rs_messages__mysection, "'", "''") + "' OR section='whole')  ORDER
> BY messageThread
>
>   counting statement:
>
>   SELECT COUNT(1) AS Responses, messageThread  FROM tbl_messageBoard
> WHERE messageState='response' AND (section='" + Replace(mySection, "'",
> "''") + "' OR section='whole') GROUP BY messageThread
>
>   again this changes its where clause according to where you work.
>
>   sorry this was really hard to explain - but usually people here kno
> everything so I am hopeful!!
>   alex
>
>
> ---------------------------------
> How much free photo storage do you get? Store your holiday snaps for FREE
> with Yahoo! Photos. Get Yahoo! Photos
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>  SPONSORED LINKS
>   Basic programming 
> language<http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=bnac3LCZpttb3c9FvbVU-A>
>   Computer
> programming 
> languages<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=1Czd2hKCO9_u4KVZQperFQ>
>   Programming
> languages<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=TyHGCjod4YOKITrSq1xccQ>
>    Java
> programming 
> language<http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&c=4&s=126&.sig=PZAexF9LyXpKb3HDJSlB1g>
>  ------------------------------
> YAHOO! GROUPS LINKS
>
>
>    -  Visit your group 
> "AspClassicAnyQuestionIsOk<http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk>"
>    on the web.
>
>    -  To unsubscribe from this group, send an email to:
>     [EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
>    -  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>    Service <http://docs.yahoo.com/info/terms/>.
>
>
>  ------------------------------
>


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to