Re: Stored Procedure Problem

Поиск
Список
Период
Сортировка
От Héctor Iturre
Тема Re: Stored Procedure Problem
Дата
Msg-id 20021212134332.42226.qmail@web20106.mail.yahoo.com
обсуждение исходный текст
Ответ на Stored Procedure Problem  ("Atul" <atul@imcindia.net>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Christoph Haller
Дата:
Сообщение: Re: Stored Procedure Problem
Следующее
От: Philip Warner
Дата:
Сообщение: Re: Performance Problems