Subject | [IBO] Bad result with LEFT JOIN in IB_Query |
---|---|
Author | Sergio Zoccante |
Post date | 2003-07-03T21:51:24Z |
The query
0)
SELECT U_LOCALI.UNITA
, U_LOCALI.NOMINATIVO
, U_LOCALI.COMM
, DITTE.NOMINATIVO CLIENTE
, U_LOCALI.VIA
FROM U_LOCALI
LEFT OUTER JOIN DITTE ON (U_LOCALI.COMM=DITTE.CODICE)
ORDER BY U_LOCALI.NOMINATIVO
1) The output is in IB_Grid, connected to IB_IncSearch control.
The Problem:
if DITTE has'n record corresponding, the row is not (visible?) in
resultset, BUT only if I'm searching with IB_incSearch control, or
browsing.
If I change the order, (e.g. ORDER BY U_LOCALI.UNITA, wich is a PK), or if
I'm searching with IB_SearchPanel, this row (with empty Cliente) is
visible.
2) Also, if the same SQL is executed in a IB_grid, without IB_Incsearch,
all works fine.
In the case 1), the SQLMonitor show this statement:
SELECT U_LOCALI.UNITA
, U_LOCALI.NOMINATIVO
, U_LOCALI.COMM
, DITTE.NOMINATIVO CLIENTE
, U_LOCALI.VIA
FROM U_LOCALI
LEFT OUTER JOIN DITTE ON (U_LOCALI.COMM=DITTE.CODICE)
WHERE ( NOMINATIVO >= ? /* OLNK_NOMINATIVO */ )
ORDER BY U_LOCALI.NOMINATIVO ASC
The IBO was intoduced the WHERE line; why?
In the case 2), the SQLMonitor show the same statement 0), not modified.
I suppose the IB search (in WHERE condition) for NOMINATIVO in DITTE and
not in U_LOCALI , but I'm not able to modify this behavior.
Any help for me?
Thanks
Sergio
0)
SELECT U_LOCALI.UNITA
, U_LOCALI.NOMINATIVO
, U_LOCALI.COMM
, DITTE.NOMINATIVO CLIENTE
, U_LOCALI.VIA
FROM U_LOCALI
LEFT OUTER JOIN DITTE ON (U_LOCALI.COMM=DITTE.CODICE)
ORDER BY U_LOCALI.NOMINATIVO
1) The output is in IB_Grid, connected to IB_IncSearch control.
The Problem:
if DITTE has'n record corresponding, the row is not (visible?) in
resultset, BUT only if I'm searching with IB_incSearch control, or
browsing.
If I change the order, (e.g. ORDER BY U_LOCALI.UNITA, wich is a PK), or if
I'm searching with IB_SearchPanel, this row (with empty Cliente) is
visible.
2) Also, if the same SQL is executed in a IB_grid, without IB_Incsearch,
all works fine.
In the case 1), the SQLMonitor show this statement:
SELECT U_LOCALI.UNITA
, U_LOCALI.NOMINATIVO
, U_LOCALI.COMM
, DITTE.NOMINATIVO CLIENTE
, U_LOCALI.VIA
FROM U_LOCALI
LEFT OUTER JOIN DITTE ON (U_LOCALI.COMM=DITTE.CODICE)
WHERE ( NOMINATIVO >= ? /* OLNK_NOMINATIVO */ )
ORDER BY U_LOCALI.NOMINATIVO ASC
The IBO was intoduced the WHERE line; why?
In the case 2), the SQLMonitor show the same statement 0), not modified.
I suppose the IB search (in WHERE condition) for NOMINATIVO in DITTE and
not in U_LOCALI , but I'm not able to modify this behavior.
Any help for me?
Thanks
Sergio