pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Héctor Iturre <hhiturre@yahoo.com.ar>
To: Atul <atul@imcindia.net>
Subject: Re: Stored Procedure Problem
Date: Thu, 12 Dec 2002 10:43:32 -0300 (ART)
Message-ID: <20021212134332.42226.qmail@web20106.mail.yahoo.com> (raw)
In-Reply-To: <LHEOILFLDANINFJAGPEOEEFMCAAA.atul@imcindia.net>

Hi, 
   use this

 CREATE FUNCTION b_function() RETURNS int4 AS '
 DECLARE
    an_integer int4;
 BEGIN
    select into an_integer emp_id from employee;
    return an_integer;
 END;
 '
 LANGUAGE 'plpgsql';


 --- Atul <atul@imcindia.net> escribió: > Hello,
> 
>                 Atul Here, I have one problem while
> accessing Database
> Records Or Recordset from stored procedure.
> Procedure is like this,
> 
> CREATE FUNCTION b_function() RETURNS int4 AS '
> DECLARE
>    an_integer int4;
> BEGIN
>    select emp_id from employee;
>    return an_integer;
> END;
> '
> LANGUAGE 'plpgsql';
> 
> I create the procedure . After that I run the
> statement like
> 
> Test=#> select b_function();
> 
> Error comes like
> 
> Error: ERROR:  SELECT query has no destination for
> result data.
>                 If you want to discard the results,
> use PERFORM instead.
> WARNING:  Error occurred while executing PL/pgSQL
> function b_function
> WARNING:  line 4 at SQL statement
> 
> Also I use PERFORM statement. But still problem is
> not resolved.
> 
> Please Help me. I hope your kind co-operation.
> 
> Thanks.
> 
> Atul…
>  

Ahora podés usar Yahoo! Messenger desde tu celular. Aprendé cómo hacerlo en Yahoo! Móvil: http://ar.mobile.yahoo.com/sms.html



view thread (7+ messages)  latest in thread

Message-ID: <20021212134332.42226.qmail@web20106.mail.yahoo.com>
Permalink:  ../20021212134332.42226.qmail@web20106.mail.yahoo.com/
Also on:    postgresql.org/message-id/20021212134332.42226.qmail@web20106.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: hhiturre@yahoo.com.ar, atul@imcindia.net
  Subject: Re: Stored Procedure Problem
  In-Reply-To: <20021212134332.42226.qmail@web20106.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox