Article View: borland.public.interbase.sql
Article #376Re: Join - understand strange results
From: Adalberto Baldini
Date: Fri, 25 Apr 2008 08:39
Date: Fri, 25 Apr 2008 08:39
34 lines
2254 bytes
2254 bytes
More details for puzzle. (I rebuid DB and pumped data).
select csoc, abinp, ambname, a_abiqt, au_inpaut , au_celur
from AB_USRSOCINP (:UTENTE, :SOC_SEL, :ESER)
where (ABINP = '' ) and (A_ABIQT = '')
OK. returns 1 record (I put '' for empty string):
DEM1, '', name, '', 1, 0
---------------------------------------
select csoc, abinp, ambname, a_abiqt, au_inpaut , au_celur
from AB_USRSOCINP (:UTENTE, :SOC_SEL, :ESER)
where (ABINP = '' ) and (A_ABIQT = '') and
(au_inpaut = '1') or (au_celur = '1')
returns 2 records :
DEM1, '', name, '', 1, 0
DEM1, ABIT, name, ABIT, 1,1 ?????? ABINP <> ''
---------------------------------------
select csoc, abinp, ambname, a_abiqt, au_inpaut , au_celur
from AB_USRSOCINP (:UTENTE, :SOC_SEL, :ESER)
where (ABINP = '' ) and (A_ABIQT = '')and
((au_inpaut = '1') or (au_celur = '1'))
OK returns 1 record :
DEM1, '', name, '', 1, 0
I agree that where clause in 2nd example is not well built but why I get
record that doesn't match test ?
Thanks
Adalberto
Technical Details
Message-ID:
<481198bf@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<480c85b4$1@newsgroups.borland.com> <480ca9f3$1@newsgroups.borland.com> <480e09f4$1@newsgroups.borland.com> <480f8e10$1@newsgroups.borland.com> <4810a7dd@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 Date: Fri, 25 Apr 2008 10:39:29 +0200 From: Adalberto Baldini <finman@swissonline.ch> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.interbase.sql Subject: Re: Join - understand strange results References: <480c85b4$1@newsgroups.borland.com> <480ca9f3$1@newsgroups.borland.com> <480e09f4$1@newsgroups.borland.com> <480f8e10$1@newsgroups.borland.com> <4810a7dd@newsgroups.borland.com> In-Reply-To: <4810a7dd@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080424-0, 24/04/2008), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 83.77.163.88 Message-ID: <481198bf@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1209112767 83.77.163.88 (25 Apr 2008 01:39:27 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail