Subject | Re: [IBO] Ordering in a grid derived from two tables |
---|---|
Author | Russell Belding |
Post date | 2001-07-29T00:44:29Z |
Thanks Jason for your reply.
Removing the alias' allowed the Ordering glyphs to appear and the ordering
to function as desired.
I have removed the JOIN criteria from the WHERE clause and inserted a JOIN
.. ON .. clause following your advice (this was not required to get
ordering going), but it is presumably for efficiency?
SELECT
BCD_DOCUMENTS.DOC_ID,
APP_DOC_LISTS.DOC_NUM,
APP_DOC_LISTS.APP_ID,
APP_DOC_LISTS.STAGE,
APP_DOC_LISTS.PRESENT_ORDER,
BCD_DOCUMENTS.DOC_NAME,
BCD_DOCUMENTS.DOC_PATH,
BCD_DOCUMENTS.DOC_DESCRIPTION,
BCD_DOCUMENTS.DOC_STATUS,
BCD_DOCUMENTS.DOC_MACRO,
BCD_DOCUMENTS.DOC_IX
from APP_DOC_LISTS
join BCD_DOCUMENTS on APP_DOC_LISTS.DOC_NUM = BCD_DOCUMENTS.DOC_ID
where
APP_DOC_LISTS.APP_ID=32772
and APP_DOC_LISTS.STAGE=1
Now the ordering glyphs show in the TIB_Grid titles and ordering works as
desired using
ordering items
Id=DOC_NUM; DOC_NUM DESC
POrder=PRESENT_ORDER;PRESENT_ORDER DESC
Name=DOC_NAME; DOC_NAME DESC
Path=DOC_PATH; DOC_PATH DESC
and ordering links
DOC_NUM=1
PRESENT_ORDER=2
DOC_NAME=3
DOC_PATH=4
Russell
----- Original Messages-----
From: "Jason Wharton" <jwharton@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, July 29, 2001 5:53 AM
Subject: Re: [IBO] Ordering in a grid derived from two tables
One thing I spotted real quick was you have done an IBO No-No. You put JOIN
criteria in your where clause.
You should either put it in the JoinLinks property or use declarative JOIN
syntax with the ON clause.
As for ordering, you should be able to do it as you are wanting. If you want
the glyphs you need to make sure your OrderingLinks are setup properly.
Removing the alias' allowed the Ordering glyphs to appear and the ordering
to function as desired.
I have removed the JOIN criteria from the WHERE clause and inserted a JOIN
.. ON .. clause following your advice (this was not required to get
ordering going), but it is presumably for efficiency?
SELECT
BCD_DOCUMENTS.DOC_ID,
APP_DOC_LISTS.DOC_NUM,
APP_DOC_LISTS.APP_ID,
APP_DOC_LISTS.STAGE,
APP_DOC_LISTS.PRESENT_ORDER,
BCD_DOCUMENTS.DOC_NAME,
BCD_DOCUMENTS.DOC_PATH,
BCD_DOCUMENTS.DOC_DESCRIPTION,
BCD_DOCUMENTS.DOC_STATUS,
BCD_DOCUMENTS.DOC_MACRO,
BCD_DOCUMENTS.DOC_IX
from APP_DOC_LISTS
join BCD_DOCUMENTS on APP_DOC_LISTS.DOC_NUM = BCD_DOCUMENTS.DOC_ID
where
APP_DOC_LISTS.APP_ID=32772
and APP_DOC_LISTS.STAGE=1
Now the ordering glyphs show in the TIB_Grid titles and ordering works as
desired using
ordering items
Id=DOC_NUM; DOC_NUM DESC
POrder=PRESENT_ORDER;PRESENT_ORDER DESC
Name=DOC_NAME; DOC_NAME DESC
Path=DOC_PATH; DOC_PATH DESC
and ordering links
DOC_NUM=1
PRESENT_ORDER=2
DOC_NAME=3
DOC_PATH=4
Russell
----- Original Messages-----
From: "Jason Wharton" <jwharton@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, July 29, 2001 5:53 AM
Subject: Re: [IBO] Ordering in a grid derived from two tables
> Get rid of the table alias stuff in the property settings. They are.....
> preventing IBO from knowing which column is actually being referred to. I
> don't want the expense of parsing for the table alias names you are using.
One thing I spotted real quick was you have done an IBO No-No. You put JOIN
criteria in your where clause.
You should either put it in the JoinLinks property or use declarative JOIN
syntax with the ON clause.
As for ordering, you should be able to do it as you are wanting. If you want
the glyphs you need to make sure your OrderingLinks are setup properly.