Subject Re: [IBO] Syntax of Links?
Author Daniele Teti
Helen Borrie wrote:

>>Only for grids? So, If I've a grid for select and a form for editing
>>with some combolookup I'm not need KeyDescLinks?
>>[cut]
>>
>>
>
>The TIB_Grid and other native IBO controls can't be used with the TIBOQuery
>and other TDataset-compatible components.
>
>
Yes, I'm mistake... I'm use TIB_Query (Native not TDataSet)

>>>See also the examples in the Samples directory of your IBO installation.
>>>
>>>
>>>
>>Another question.
>>There is particular reason for this syntax
>>
>>SELECT
>> ID
>> , TESTO
>> , DATA
>> , ID_AUTORE
>> , (SELECT DESCRIZIONE FROM AUTORI
>> WHERE ID=B.ID_AUTORE) AUTORE
>>
>>
>>FROM BARZE B
>
>
>>insted of (IMHO more cleaner )
>>
>>SELECT
>> A.ID ID
>> , TESTO
>> , DATA
>> , ID_AUTORE
>> , DESCRIZIONE
>>FROM
>>BARZE B
>>join
>>AUTORI A
>>on B.ID_AUTORE=A.ID
>>
>>I've seen this syntax in many examples...
>>
>>There is a reason to use 1st instead of 2nd ?
>>
>>
>
>They are not the same. In the first, you will get all of the rows from
>BARZE that are found by the WHERE clause; in the second, you will get all
>of the rows in the table, but only those rows where a match is found for
>the join.
>
>
>
BARZE and AUTORI have a relation on BARZE.ID_AUTORE = AUTORI.ID

For this kind of FK relation, selected data are the same.
Why IBO Sample use the 1st instead the 2nd? There is areason?

>The first query is equivalent to a left outer join between BARZE and AUTORI.
>
>SQL questions should be posted in Firebird-support, by the way.
>
>
>
Thanx Helen


--
Daniele Teti (tm)
Software Architect
http://dade2000.altervista.org
--



[Non-text portions of this message have been removed]