Subject Re: [IBO] Ordering by description obtained via theTIB_LookupCombo of a Grid
Author Helen Borrie
At 04:51 AM 12-12-01 +0000, you wrote:
>"Configuring TIB_LookupCombo" (From IBO.Hlp)
>Table Produce:
>Name ­ A(20) Table ProduceType:
>Type ­ A(4) <----------------> Type ­ A(4)
>Description ­ A(40) Description ­ A(30)
>Price ­ N(15, 4)
>Qty ­ I
>
>Teble produce SELECT
>SELECT
> NAME,
> (select DESCRIPTION from PRODUCETYPE T
> where T.TYPE = P.TYPE) as TYPE_DESC,
> DESCRIPTION,
> PRICE,
> QTY
>from PRODUCE P
>
>1.- Achieved lookupCombo working ok inside the Grid.
>2.- Using the description (TYPE_DESC) as an ordering field

where did you use it ? if in SQL, you can order by a subselect as long as you use the
ORDER BY n
syntax, where n is the 1-based ordinal number of the output column.

In this case,
SELECT
NAME,
(select DESCRIPTION from PRODUCETYPE T
where T.TYPE = P.TYPE) as TYPE_DESC,
DESCRIPTION,
PRICE,
QTY
from PRODUCE P
ORDER BY 2

If not, then more info please.

regards,
Helen


>3.- I get the following error message when prepare:
> SQL error code= -206
> Column unknown
> TYPE_DESC
>
>i´m clueless. need advice
>thanks in advance
>8-|
>
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

All for Open and Open for All
InterBase Developer Initiative · http://www.interbase2000.org
_______________________________________________________