Article View: borland.public.interbase.sql
Article #277Re: Simple Stored Procedure Problem
From: Helmut W�ss
Date: Sun, 17 Mar 2002 08:00
Date: Sun, 17 Mar 2002 08:00
45 lines
2213 bytes
2213 bytes
you forgot to put the result into the ouput variable! must be: SELECT count(*) FROM Banners into :a_value; bye, helmut "Ryan Born" <ryanborn@uiuc.edu> schrieb im Newsbeitrag news:3c93cc5f$1_2@dnews... > After an accidental post on my last one, here is my real problem! > > I have this Attempt to create a SP, but it won't work. > ------------------------------------------------------------ > SET TERM !!; > > CREATE PROCEDURE my_procedure > RETURNS (a_value INTEGER) > AS > BEGIN > > SELECT count(*) FROM Banners; > > END !! > > SET TERM ;!! > ------------------------------------------------------------ > And I get this error: > ------------------------------------------------------------ > Dynamic SQL Error > SQL error code = -104 > Token unknown - line 5, char 27 > ; > Statement: CREATE PROCEDURE my_procedure > RETURNS (a_value INTEGER) > AS > BEGIN > SELECT count(*) FROM Banners; > END > ------------------------------------------------------------ > What is my problem here? This is the most simple of all stored Procs. > I am in client Dialect 1. > > -Ryan > >
Technical Details
Message-ID:
<3c944d23$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!62.24.128.9.MISMATCH!news-1.opaltelecom.net!newsfeed.wirehub.nl!newsfeed.icl.net!newsfeed1.cidera.com!Cidera!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3c93cc5f$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd38c,3f0dbf6d00b0f337 X-Google-Attributes: gidfd38c,public X-Google-Thread: 114a0e,3f0dbf6d00b0f337 X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-03-17 00:02:29 PST From: "Helmut W�ss" <h.woess@iis-edv.at> Newsgroups: borland.public.interbase.sql,borland.public.interbase.general References: <3c93cc5f$1_2@dnews> Subject: Re: Simple Stored Procedure Problem Date: Sun, 17 Mar 2002 09:00:57 +0100 Lines: 47 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 62.46.226.220 Message-ID: <3c944d23$1_1@dnews> X-Trace: dnews 1016352035 62.46.226.220 (17 Mar 2002 00:00:35 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!62.24.128.9.MISMATCH!news-1.opaltelecom.net!newsfeed.wirehub.nl!newsfeed.icl.net!newsfeed1.cidera.com!Cidera!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews