>From experience with SQL (not interbase), I think you need to refer to
SUM(D.QTY) in your order by clause rather than it's alias.  i.e.
"order by SUM(D.QTY)"

Daryl Marsden
Project Management Analyst
Environment Canterbury
P O Box 345
Christchurch

Phone (03) 365-3828 Ext 7141
Fax (03) 365-3194

http://www.ecan.govt.nz



Visit us online at http://www.ecan.govt.nz



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

The contents of this email and any attachments are not formal 
policy of Environment Canterbury, unless otherwise stated.
**********************************************************************

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to