I run the following query in interbase 5.5:
(select min(termid) from coursetaker where studentid=h.humanid) startterm
from coursetaker c,human h,student s
c.termid between 10009 and 10106
order by h.lastname,h.firstname
It works ok, but one thing. I want non-duplicate records. I put distinct after select and before all the fields and it gives an error:
General SQL error.
Invalid request BLR at offset 215
context already in use (BLR error).
Does anybody know how can I run the above query for distinct records?