Funcion

From: Gilberto Castillo Martínez <gilberto(dot)castillo(at)etecsa(dot)cu>
To: "pgsql-es-ayuda(at)postgresql(dot)org" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Funcion
Date: 2008-03-05 22:05:09
Message-ID: 1204754709.6759.2.camel@gilbertoc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Estoy utilizando esta función para que me devuelva un select:

CREATE OR REPLACE FUNCTION listarTipoDocumento(dato "varchar")
RETURNS varchar AS
$BODY$
DECLARE

lista_dato record;
BEGIN
IF dato isnull THEN
select * into lista_dato from nom_tipo_documento;
END IF;
IF dato notnull THEN
select * into lista_dato from nom_tipo_documento where
tipo_documento like '%dato%';
END IF;
RETURN lista_dato;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;

Pero me devuelve la cadena vacía ¿ que estoy haciendo mal? help.

Responses

  • Re: Funcion at 2008-03-05 22:20:54 from Espartano
  • Re: Funcion at 2008-03-06 01:09:43 from Gabriel Hermes Colina Zambra

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Espartano 2008-03-05 22:20:54 Re: Funcion
Previous Message Miguel Beltran R. 2008-03-05 18:42:13 Sincronizar información entre dos bases... postgresql y mssql