[Info-ingres] Wrong results returned from outer join



My ingres version is 11273 1 II 2.6/0305 (su4.us5/00.
I think the script below should produce 0 rows according to what is written
in the SQL manual:
" Outer joins specified in the from clause are not the same as joins
specified in the where clause: the from clause specifies sources of data,
while the where clause specifies restrictions to be applied to the sources
of data to produce the
results table."

The last condition '(i_type >=90 or i_t > 0)' is not satisfied for any row.
Still the script returns all 2 rows.
Am I right ?


DECLARE GLOBAL TEMPORARY TABLE session.a

(i_id i4 not null, i_type i1 not null, i_date date not null)

ON COMMIT PRESERVE ROWS WITH NORECOVERY

;

insert into session.a values (21, 11, 'now');

insert into session.a values (221, 41, 'now');



DECLARE GLOBAL TEMPORARY TABLE session.b (i_id i4 not null, i_t i1 not null)

ON COMMIT PRESERVE ROWS WITH NORECOVERY

;

insert into session.b values (21, 0);

insert into session.b values (221, 0);



select a.*,b.i_t

from session.a a left join session.b b

on a.i_id=b.i_id

where i_date > 'today'

and (i_type >=90 or i_t > 0);

\g

~

.



Relevant Pages

  • RE: Any good T-SQL quick reference recommended?
    ... The full syntax of the SELECT ... SELECT Clause ... Specifies the columns to be returned by the query. ... Specifies that duplicate rows can appear in the result set. ...
    (microsoft.public.sqlserver.programming)
  • Re: top n problem
    ... Delbert Glass wrote: ... If the query has no ORDER BY clause, the order of the rows is arbitrary. ... "A car burns fuel." ... >n specifies how many rows are returned. ...
    (microsoft.public.sqlserver.programming)
  • Re: top n problem
    ... >to be output from the query result set. ... >ordered by the ORDER BY clause are output. ... >Specifies that additional rows be returned ... does not mean UNION without ALL is undefined. ...
    (microsoft.public.sqlserver.programming)
  • RE: error 8120 not contained aggregate function error
    ... GROUP BY Clause ... Specifies the groups into which output rows are to be placed and, ... aggregate functions are included in the SELECT clause, ... > from CCList inner join CCThemes on CCThemes.ThemeID=CCList.CalculationTheme ...
    (microsoft.public.sqlserver.programming)
  • Re: Changing user attribute in AD script driving me batty
    ... This script modifies an attribute of all the accounts in a specified ... /value: specifies new value. ... Verbose "Connecting to root of domain" ... For Each oADObject in oContainer ...
    (microsoft.public.scripting.wsh)