🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #374

Re: Join - understand strange results

#374
From: Wayne Niddery (TeamB)
Date: Wed, 23 Apr 2008 19:29
44 lines
2723 bytes
"Adalberto Baldini" <finman@swissonline.ch> wrote in message 
news:480e09f4$1@newsgroups.borland.com...
> If I  try :
> 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
>
> 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:
>
> 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

That definitely is a puzzle, it looks like the data must be right, so 
possibly there's a bug somewhere.

What happens if you, using IBConsole or ISQL, simply select directly from 
the stored procedure passing various parameters? Do you always get correct 
returns? Is the stored proc properly calling SUSPEND to return a result set 
rather than a single set of return values? (Even if it is designed to always 
return just one record, if you are going to use it as part of a select 
statement it must call SUSPEND as far as I know).

-- 
Wayne Niddery - TeamB (www.teamb.com)
Winwright, Inc. (www.winwright.ca) 
Technical Details
Message-ID: <480f8e10$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!newsgroups.borland.com!not-for-mail
References: <480c85b4$1@newsgroups.borland.com> <480ca9f3$1@newsgroups.borland.com> <480e09f4$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
From: "Wayne Niddery \(TeamB\)" <wniddery@chaffaci.on.ca>
Newsgroups: borland.public.interbase.sql
References: <480c85b4$1@newsgroups.borland.com> <480ca9f3$1@newsgroups.borland.com> <480e09f4$1@newsgroups.borland.com>
In-Reply-To: <480e09f4$1@newsgroups.borland.com>
Subject: Re: Join - understand strange results
Date: Wed, 23 Apr 2008 15:29:20 -0400
Lines: 45
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.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000
NNTP-Posting-Host: 24.137.214.213
Message-ID: <480f8e10$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1208978960 24.137.214.213 (23 Apr 2008 12:29:20 -0700)
X-Authenticated-User: wniddery
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!newsgroups.borland.com!not-for-mail