SQL

Ivan Smahin ivan_smahin at paradigmasoft.com
Wed Feb 20 05:43:11 CST 2008


Hello Mr.,

Wednesday, February 20, 2008, 1:40:45 PM, you wrote:

> Hi List,

> I'm a bit dense today so if anybody could enlighten me for this query:

> select objptr_assignment_student_id,count(recid) as 'TotalQ' from  
> tbl_results Group By objptr_assignment_student_id

> works but it need only those where TotalQ < 25

> using HAVING  TotalQ < 25 is accepted by the parser but does not  
> influence the cursor (25 is still included)

> and WHERE is refused because of using group by.

> Inspiration needed

I will check it - it should be working.

Anyway as workaround you can use something like this:

select * from
( select objptr_assignment_student_id,count(recid) as 'TotalQ' from
  tbl_results Group By objptr_assignment_student_id )
where TotalQ < 25

-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list