🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: debug stored procedures

#328
From: Bill Todd [TeamB]
Date: Tue, 20 May 2008 15:45
22 lines
2089 bytes
Isaac wrote:

> 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)

I posted the wrong SQL. The SQL should have been:

select SUM(COALESCE(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)

Again, make sure that you replace the two parameters with actual values
before you try to execute it using isql.

-- 
Bill Todd (TeamB)
Technical Details
Message-ID: <4832f208$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!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> <4832e3e1@newsgroups.borland.com> <4832e64f$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> <4832e3e1@newsgroups.borland.com> <4832e64f$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: <4832f208$1@newsgroups.borland.com>
Date: 20 May 2008 08:45:12 -0700
X-Trace: newsgroups.borland.com 1211298312 76.208.40.243 (20 May 2008 08:45:12 -0700)
Lines: 22
X-Authenticated-User: btodd
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail