Article View: borland.public.interbase.sql
Article #373Re: Join - understand strange results
From: Adalberto Baldini
Date: Tue, 22 Apr 2008 15:53
Date: Tue, 22 Apr 2008 15:53
49 lines
2836 bytes
2836 bytes
----- Original Message ----- From: "Wayne Niddery (TeamB)" <wniddery@chaffaci.on.ca> Newsgroups: borland.public.interbase.sql Sent: Monday, April 21, 2008 4:51 PM Subject: Re: Join - understand strange results > Because you are now requiring a match between fields. Apparently, for the > above row, there is no matching record returned by the stored procedure > (no match on abinp or fil fields). That's the problem, because a.abinp and a.fil are same data, passed as parameters for table B and for test : How can I check which caracter makes the difference ? If I try : ------------------------------------------------------------------------------------ select distinct a.abinp, a.fil, b.abinp, b.fil, b.ambname, b.filname from giocoge a left join ABFL_USRSOCINP_UNO (:UTENTE, a.csoc, a.nreserc, 'ABIT', 'DETO') b on (b.abinp = 'ABIT' and b.fil = 'DETO' ) where a.conto = '0601' and a.sezio = '5' and a.abinp = 'ABIT' and a.fil = 'DETO' OR select [..] left join ABFL_USRSOCINP_UNO (:UTENTE, a.csoc, a.nreserc, 'ABIT', 'DETO') b on (b.abinp = a.abinp and b.fil = a.fil ) where a.conto = '0601' and a.sezio = '5' and a.abinp = 'ABIT' and a.fil = 'DETO' I get right data: ABIT DETO ABIT DETO XX1 YY1 --------------------------------------------------------------------------------------- select [..] left join ABFL_USRSOCINP_UNO (:UTENTE, a.csoc, a.nreserc, a.abinp, a.fil) b on (b.abinp = a.abinp and b.fil = a.fil ) where a.conto = '0601' and a.sezio = '5' and a.abinp = 'ABIT' and a.fil = 'DETO' I get ABIT DETO null null null null Could you give me an help ? Thanks Adalberto
Technical Details
Message-ID:
<480e09f4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!newsgroups.borland.com!not-for-mailReferences:
<480c85b4$1@newsgroups.borland.com> <480ca9f3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,11ad783c403646e4 X-Google-Attributes: gid114a0e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Adalberto Baldini" <finman@swissonline.ch> From: "Adalberto Baldini" <finman@swissonline.ch> Newsgroups: borland.public.interbase.sql References: <480c85b4$1@newsgroups.borland.com> <480ca9f3$1@newsgroups.borland.com> In-Reply-To: <480ca9f3$1@newsgroups.borland.com> Subject: Re: Join - understand strange results Date: Tue, 22 Apr 2008 17:53:22 +0200 Lines: 50 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 NNTP-Posting-Host: 85.7.18.24 Message-ID: <480e09f4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1208879604 85.7.18.24 (22 Apr 2008 08:53:24 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!newsgroups.borland.com!not-for-mail