Strange left join behavior

Discussion regarding older releases of Team Developer.

Strange left join behavior

Postby gigit » Mon Jan 30, 2017 7:28 am

Hi to all.
This two selects

select R.dt_rapp, R.n_rapp, R.c_intesta, R.c_articolo, A.d_articolo, R.n_progetto,P.sg_progetto
from ((rapportini R left join ana_art A on R.c_ditta=A.c_ditta and R.c_articolo=A.c_articolo)
left join progetti P on R.n_progetto=P.n_progetto and R.c_intesta=P.c_nome)
where R.c_ditta=1 and R.n_rapp=641 and R.dt_rapp=2017-2-2;

select R.dt_rapp, R.n_rapp, R.c_intesta, R.c_articolo, A.d_articolo, R.n_progetto,P.sg_progetto
from ((rapportini R left join ana_art A on R.c_ditta=A.c_ditta and R.c_articolo=A.c_articolo)
left join progetti P on P.n_progetto=R.n_progetto and P.c_nome=R.c_intesta)
where R.c_ditta=1 and R.n_rapp=641 and R.dt_rapp=2017-2-2;

are different only for the second left join in which I inverted the comparision set. In the first case P.sg_progetto is not shown, in the second it is. This within SqlWindows 4.1 and 6.0 and 7.0 and with SqlTalk too. DB version is 9.0.1
Without the "where" clause, all rows are returned well.

Which is the problem: SqlWindows, SqlBase, me?
Thank you.
Last edited by gigit on Mon Jan 30, 2017 7:56 am, edited 1 time in total.
gigit
 
Posts: 127
Joined: Thu Jul 09, 2009 1:21 am
Location: Pordenone, Italy

Re: Strange left join behavior

Postby gigit » Mon Jan 30, 2017 7:54 am

With SqlServer it's all ok.
gigit
 
Posts: 127
Joined: Thu Jul 09, 2009 1:21 am
Location: Pordenone, Italy

Re: Strange left join behavior

Postby gigit » Mon Jan 30, 2017 8:58 am

MOVED TO SQLBASE OLDER RELEASE
gigit
 
Posts: 127
Joined: Thu Jul 09, 2009 1:21 am
Location: Pordenone, Italy


Return to Older Releases

Who is online

Users browsing this forum: No registered users and 1 guest

cron