Subject | Re: [IBO] Same table Lookups |
---|---|
Author | Geoff Worboys |
Post date | 2001-03-09T12:01:24Z |
> The problem I strike with the KeyLinks for the lookupThis definition should be OK in KeyLinks. This definition is purely
> query is trying to set
> CLIENTS.SUPERVISORNO=CLIENTS.CLIENTNO, which ain't allowed!
for IBOs information, it does not get used directly in any SQL. The
left side is the key field in the lookup dataset, the right side is
the corresponding (foreign key) in the main/destination dataset.
Also, you only need the table names (in keylinks and keydesclinks)
when the queries contain multiple relationships. You always need the
table names in masterlinks to enable search sql to be built (if you
are not using search master/detail search then it does not matter
AFAICT).
The real problem comes if you are using KeyDescLinks to enable the
display of the selection in a grid (or for use with my LookupEnh
control). The solution is to alias both the tables.
SELECT A.FIELDA,
(SELECT FIELDB FROM TABLEB B
WHERE B.KEYFIELD=A.KEYFIELD) AS FIELDB
FROM TABLEA A
HTH
Geoff Worboys
Telesis Computing