Subject Re: [IBO] Join criteria in the WHERE clause
Author Helen Borrie
At 11:59 PM 10-01-01 -0600, you wrote:

>Thank you. I have been trying to get an ordered LEFT JOIN for several hours
>now and it has been driving me crazy. I wanted to use the LEFT JOIN syntax
>to consolidate several TIB_Cursor components into one, therby reducing the
>overall network traffic

Can you explain what this means, in terms of a dataset/SQL result set?


>Any idea why an ordered LEFT JOIN is not supported ? This certianly seems
>like it would be useful ?

A LEFT INNER JOIN? What would you expect to get?




>I have been playing with singleton inner select subqueries and was wondering
>if there are any good guidelines to follow for their usage. Specifically, if
>I need say 5-10 fields out of the second table, am I better of using a
>separate TIB_Cursor to retrieve them or is the inner select acceptable ?

Not usually. You would have to do one sub-select for each column and I
think your tables are 1:1, is that right? So use LEFT OUTER JOIN to get
all the rows in the left table plus columns the right table if there is a
matching record. Be prepared to bump into problems with ordering if any
of your ordering columns is nullable.

TIB_Cursor is a container for a dataset. If you need one dataset, use one
TIB_Cursor. If you need two datasets, use two TIB_cursors.

H.

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________