Subject | RE: [firebird-support] ORDER BY invalid column |
---|---|
Author | Rick Debay |
Post date | 2005-12-16T18:42:21Z |
Thanks that works, but I'm also looking for confirmation that my
previous query was valid SQL, so I can submit a bug report.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: Friday, December 16, 2005 1:18 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] ORDER BY invalid column
Rick Debay wrote:
Name each column from Procedure P_RPL_NDC9_2 (P) instead of using p.*
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
previous query was valid SQL, so I can submit a bug report.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: Friday, December 16, 2005 1:18 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] ORDER BY invalid column
Rick Debay wrote:
>I was running a one-off query in order to do some inventory analysis,Rick,
>and got this error. FB will only allow me to choose columns returned
>from the table in this query, not generated columns (ORDER BY 9 also
>fails). Which is strange, as I know I've used generated columns in
>other queries.
>
>Dynamic SQL Error SQL error code = -104 Invalid column position used in
>the ORDER BY clause
>
>select
> p.*,
> (p.decimalqty - p.order_qty - p.po_qty - p.bo_qty) outstanding,
> (select first 1 d.labelname from mddb_drug d where d.PRODUCTID/100 =
>p.ndc9) <== column 10
>from
> P_RPL_NDC9_2( '01J' ) p
>where
> (p.decimalqty - p.order_qty - p.po_qty - p.bo_qty) > 0 order by
> 10
>
>
Name each column from Procedure P_RPL_NDC9_2 (P) instead of using p.*
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links