Subject Problem with LEFT JOIN in IB_Query
Author Sergio Zoccante
Hallo!
0) I've a query like
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.
I've this 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 problem is in this difference, but I'm not able to modify
this behavior.


Do you have some suggestion?

TIA

Sergio Zoccante