Re: [SQL] A SQL Question About distinct, limit, group by, having, aggregate

2005-03-31 Thread Lin Kun Hsin
Actually, i have a method to solve this problem. But i really want to know, we have to write more statement to do one thing? First step, we have to create 2 sequence. Let call them "foo" and "foo1". create sequence foo; create sequence foo1; then, you can run below statement, and you will see t

Re: [SQL] A SQL Question About distinct, limit, group by, having, aggregate

2005-03-30 Thread Lin Kun Hsin
below is the sql schema. i hope it will help. i want the top 3 score students in every class below is the original sql solution, but when we have 100 class , we have to union 100 times? have any better performance statement? select * from ( (select * from allscore where class = 'a' order by sc

Re: [SQL] delphi access question

2005-03-30 Thread Lin Kun Hsin
hello I can run your sql statement in PgAdmin,too. so your statement should be OK! Can you post more example about add to result, let us have idea about your question. I think you can try to set char(1) to char(2), try it will useful.. -- http://alumni.cyut.edu.tw Open WebMail Project (http:/