🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: debug stored procedures

#324
From: Bill Todd [TeamB]
Date: Tue, 20 May 2008 14:44
18 lines
1891 bytes
Sorry. I did not scroll down far enough to see that you had replied to
one of your earlier messages.

Apparently you cannot use COALESCE in two SUM aggregates in the same
SELECT. Try running

select COALESCE(sum(QTY),0) from purchase_inv_item
   left outer join purchase_inv on (purchase_inv_item.pur_code =
purchase_inv.pur_code)
    where (purchase_inv.purch_return <> 1)
      and (PURCHASE_INV_ITEM.item_code = :p_new_item_code)
      and (PURCHASE_INV_ITEM.inv_code = :p_new_inv_code)

in isql after replacing the parameters with literal values and see if
you still get an error.

-- 
Bill Todd (TeamB)
Technical Details
Message-ID: <4832e3e1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.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: <4831f162@newsgroups.borland.com> <4831f280@newsgroups.borland.com> <4831f42a@newsgroups.borland.com> <483201d3$1@newsgroups.borland.com> <48321ed5$1@newsgroups.borland.com> <4832c323@newsgroups.borland.com> <4832cc01@newsgroups.borland.com> <4832d6a0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,8feff649be448d0
X-Google-Attributes: gid114a0e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bill Todd [TeamB]" <no@no.com>
Subject: Re: debug stored procedures
Newsgroups: borland.public.interbase.sql
References: <4831f162@newsgroups.borland.com> <4831f280@newsgroups.borland.com> <4831f42a@newsgroups.borland.com> <483201d3$1@newsgroups.borland.com> <48321ed5$1@newsgroups.borland.com> <4832c323@newsgroups.borland.com> <4832cc01@newsgroups.borland.com> <4832d6a0$1@newsgroups.borland.com>
Organization: The Database Group, Inc.
User-Agent: XanaNews/1.18.1.9
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 76.208.40.243
Message-ID: <4832e3e1@newsgroups.borland.com>
Date: 20 May 2008 07:44:49 -0700
X-Trace: newsgroups.borland.com 1211294689 76.208.40.243 (20 May 2008 07:44:49 -0700)
Lines: 18
X-Authenticated-User: btodd
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.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