🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: S.Proc

#620
From: Bill Todd
Date: Sat, 01 Sep 2007 14:35
38 lines
1859 bytes
Serra wrote:

> IB 6,02
> 
> I created below s.proc in IbConsole without any error message
> but when i try to call this proc ( select * from test (10)
> i get below err. message
> Error=Aritmetic Exception, Numeric Owerflow or
> String Truncation....
> 
> What is wrong ?
> 
> CREATE  PROCEDURE  TEST (QTY SMALLINT)
> RETURNS (
> RNO INTEGER,
> ODATE  DATE,
> CUSTNAME  VARCHAR(40),
> TOTAL NUMERIC (15,2))
> AS
> BEGIN
> FOR SELECT  F.RNO, F.ODATE, F.TOTAL, C.CUSTNAME  FROM FLUGA F
> JOIN CUSTOMER C ON  C.CUSTNO=F.CUSTNO
> WHERE  F.ODATE > (SELECT MAX(DATE) FROM FLUGA) - : QTY
> INTO :RNO,:ODATE,CUSTNAME,:TOTAL
> DO
> SUSPEND;
> END
> 
> Thank you.

1. You should not have a space between the : and QTY in the WHERE
clause. This may or may not be part of the problem.

2. Make sure that the variables you are selecting into are as large as
the fields in the database.

-- 
Bill Todd (TeamB)
Technical Details
Message-ID: <46d978a5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46d964bd$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,821297de622fe5b0
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bill Todd" <no@no.com>
Subject: Re: S.Proc
Newsgroups: borland.public.interbase.sql
References:  <46d964bd$1@newsgroups.borland.com>
Organization: The Database Group, Inc.
User-Agent: XanaNews/1.18.1.6
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
NNTP-Posting-Host: 65.118.176.23
Message-ID: <46d978a5$1@newsgroups.borland.com>
Date: 1 Sep 2007 07:35:17 -0700
X-Trace: newsgroups.borland.com 1188657317 65.118.176.23 (1 Sep 2007 07:35:17 -0700)
Lines: 38
X-Authenticated-User: btodd
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail