Subject Re: [IBO] Problem with Ordering Items
Author Helen Borrie
At 04:40 PM 22/04/2003 -0300, you wrote:


> > What about the OrderingItems - how are they defined?
>
>I know what you're thinking, I've encountered the same problem before
>when using display labels in the Ordering Items. Thanks for reminding
>me that I forgot something in my message. Any ideas are welcomed.
>
>Ordering Items:
>PG1_FIRSTNAME=PG1_FIRSTNAME;PG1_FIRSTNAME DESC
>PG1_LASTNAME=PG1_LASTNAME;PG1_LASTNAME DESC
>PG1_HOME_PHONE=PG1_HOME_PHONE;PG1_HOME_PHONE DESC
>PG2_FIRSTNAME=PG2_FIRSTNAME;PG2_FIRSTNAME DESC
>PG2_LASTNAME=PG2_LASTNAME;PG2_LASTNAME DESC
>PG2_HOME_PHONE=PG2_HOME_PHONE;PG2_HOME_PHONE DESC
>FAMILY_ID=FAMILY_ID;FAMILY_ID DESC
>
>Ordering Links:
>PG1_FIRSTNAME=ITEM=1;POS=0
>PG1_LASTNAME=ITEM=2;POS=0
>PG1_HOME_PHONE=ITEM=3;POS=0
>PG2_FIRSTNAME=ITEM=4;POS=0
>PG2_LASTNAME=ITEM=5;POS=0
>PG2_HOME_PHONE=ITEM=6;POS=0
>FAMILY_ID=ITEM=7;POS=0
>
>Search Links:
>PG1_FIRSTNAME=PG1_FIRSTNAME
>PG1_LASTNAME=PG1_LASTNAME
>PG1_HOME_PHONE=PG1_HOME_PHONE
>PG2_FIRSTNAME=PG2_FIRSTNAME
>PG2_LASTNAME=PG2_LASTNAME
>PG2_HOME_PHONE=PG2_HOME_PHONE
>FAMILY_ID=FAMILY_ID

Daniel,
What release version of IBO are you using? I'm suspicious that the wacky
SQL that's being generated may be caused by the change to the parsing
routine that was done recently to make IBO handle the 'SELECT FIRST'
syntax. Or, alternatively, if you have an older release, maybe you are
seeing a manifestation of the bug which that change fixed.

It looks to me as if the parser might be blindly seeking out the string
'FIRST' and breaking up the pieces in some arcane way...so you are getting
this weird behaviour, where the identifiers for the database column
FIRSTNAME in the SQL are getting mangled to

SELECT First NAME PARENTS.FAMILY_ID
FROM PARENTS
WHERE PARENTS.FAMILY_ID=?

What's the actual SQL of the dataset? I'm guessing here that
PG1_FIRSTNAME, PG2_FIRSTNAME, etc. are output columns for a re-entrant
query, not database columns...right?

Helen