Subject Converting from IB 7.5 dialect 1 to FB 2dialect1
Author Thomas Miller
The problem area is the Order By clause being outside the Group By.

How do I get this working in FB? Thanks!

select ar.app_status, app.app_status_desc
from (cert_applicant_results ar left outer join app_stat_code app
on ar.org_id=app.org_id and ar.app_status=app.app_status)
left outer join app_stat_code_order asco on ar.org_id = asco.org_id
and ar.app_status = asco.app_status
where ar.org_id = :org_id
and ar.jnum = :jnum
and ar.certid = :certid
group by ar.app_status, app.app_status_desc
order by asco.app_status_order ascending

--
Thomas Miller
Chrome Portal Project Manager
CPCUG Programmers SIG Chairperson (formally Delphi)
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork

http://www.bss-software.com
http://programmers.cpcug.org/
http://sourceforge.net/projects/chromeportal/
http://sourceforge.net/projects/uopl/
http://sourceforge.net/projects/dbexpressplus