G'day Alastair,

Well I'm fishing but try putting the WHERE in parenthesis:

>SELECT FullName, DiscType_ID, ReleaseType_ID +
>FROM Track_Zero_View +
>WHERE (DiscType_ID IN
>(1,3,4,5,6,7,8,9,15,16,19,21,26,37,38,39,40,41,42,43,45) +
>AND ReleaseType_ID NOT IN (1,4,10,11)) +
>GROUP BY FullName, DiscType_ID, ReleaseType_ID +
>HAVING COUNT(*) > 9


At 20:59 19/04/02 +0100, you wrote:
>Hi everyone,
>
>I'm trying to create a menu that displays names where the number of rows in
>the table is greater than 9 where certain other conditions also apply.
>
>I've tried what seems like a hundred variations on this select statement but
>I am not getting the results I want returned:
>
>SELECT FullName, DiscType_ID, ReleaseType_ID FROM Track_Zero_View +
>WHERE DiscType_ID IN
>(1,3,4,5,6,7,8,9,15,16,19,21,26,37,38,39,40,41,42,43,45) +
>AND ReleaseType_ID NOT IN (1,4,10,11) +
>GROUP BY FullName, DiscType_ID, ReleaseType_ID +
>HAVING COUNT(*) > 9
>
>What I'm getting is rows where either DiscType_ID is NOT in the list and/or
>rows where ReleaseType_ID ARE in the list.
>The count > 9 appears to be working in that I am NOT getting names where the
>count is 9 or below.
>
>For instance, I get rows where DiscType_ID is 14 and/or Release_Type is 1.
>
>I only need the FullName returned (or its IdNum), the other two columns are
>there to try and see what is happening.
>
>If anybody has any ideas what I am doing wrong they would be greatly
>appreciated,
>Thanks in advance,
>Regards, Alastair.
>
>
>----------------------------------
>A D B Burr,
>St. Albans, UK.
>----------------------------------
>[EMAIL PROTECTED]
>----------------------------------
>
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/

Warmest regards,


Tom Grimshaw
coy:    Just For You Software
tel:    612 9552 3311
fax:    612 9566 2164
mobile: 0414 675 903

post:   PO Box 470  Glebe  NSW  2037  Australia
street: 3/66 Wentworth Park Rd  Glebe  NSW  2037

email:  [EMAIL PROTECTED]
web: www.just4usoftware.com.au

the most needed product in the world can be found at
www.thewaytohappiness.org

This email and any files transmitted with it are confidential to the 
intended recipient and may be privileged. If you have received this email 
inadvertently or you are not the intended recipient, you may not 
disseminate, distribute, copy or in any way rely on it. Further, you should 
notify the sender immediately and delete the email from your computer. 
Whilst we have taken precautions to alert us to the presence of computer 
viruses, we cannot guarantee that this email and any files transmitted with 
it are free from such viruses.

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to