Subject Re: [IBO] SubSelect as Orderingitem in TIB_Query
Author Jörg Schiemann
Here is my query

SELECT RECHNGDETAILS_ID
, RECHNUNGS_NR
, AUFTRAG_ID
, (SELECT AUFNR_INTERN FROM AUFTRAEGE
WHERE RECHNUNGEN_DETAILS.AUFTRAG_ID=AUFTRAEGE.AUFTRAG_ID)
AS PT_AUFNR_INTERN
, AUF_POS
, AUFNR_KUNDE
, LIEFER_NR
, ZEICHNUNGS_NR
, GEGENSTAND
, MENGE
, EINZELPREIS
, KOSTEN
FROM RECHNUNGEN_DETAILS
WHERE DELETED=0

and here my orderingitems

AUFNR_KUNDE=AUFNR_KUNDE, AUF_POS; AUFNR_KUNDE DESC, AUF_POS
PT_AUFNR_INTERN=PT_AUFNR_INTERN; PT_AUFNR_INTERN DESC
LIEFER_NR=LIEFER_NR; LIEFER_NR DESC
ZEICHNUNGS_NR=ZEICHNUNGS_NR; ZEICHNUNGS_NR DESC
GEGENSTAND=GEGENSTAND; GEGENSTAND DESC
EINZELPREIS=EINZELPREIS; EINZELPREIS DESC
KOSTEN=KOSTEN; KOSTEN DESC

and at last my orderinglinks

AUFNR_KUNDE=1
PT_AUFNR_INTERN=2
LIEFER_NR=3
ZEICHNUNGS_NR=4
GEGENSTAND=5
EINZELPREIS=6
KOSTEN=7



Orderingitem PT_AUFNR_INTERN=PT_AUFNR_INTERN; PT_AUFNR_INTERN DESC
doesn't work.

Here is the error from the SQL-monitor:

ERRCODE = 335544569
----*/
/*---
INTERPRETE BUFFER =

ERRCODE = 17
----*/
/*---
INTERPRETE BUFFER = Dynamic SQL Error

ERRCODE = 21
----*/
/*---
INTERPRETE BUFFER = SQL error code = -206

ERRCODE = 14
----*/
/*---
INTERPRETE BUFFER = Column unknown

ERRCODE = 15
----*/
/*---
INTERPRETE BUFFER = PT_AUFNR_INTERN

ERRCODE = -1
----*/

And FetchWholeRows is TRUE.


I can use ORDER BY with PT_AUFNR_INTERN without problem.
But I think It is not useful to use ORDER BY in the SQL and OrderingItems,
am I right?

TIA,
Jörg

----- Original Message -----
From: "Jason Wharton" <jwharton@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, May 08, 2001 6:51 PM
Subject: Re: [IBO] SubSelect as Orderingitem in TIB_Query


> Show us the details. I'm not sure what it is you are trying to do exactly.
> The ORDER BY clause is rather particular. You may need to try using the
> numerical column reference.
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "Jörg Schiemann" <schimmi@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Tuesday, May 08, 2001 5:52 AM
> Subject: [IBO] SubSelect as Orderingitem in TIB_Query
>
>
> > Hi,
> >
> > It doesn't seems do work, to have a subselect column as a orderingitem,
or
> > am I doing something wrong?
> >
> > thanks in advance,
> > Jörg
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>