Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/04/2009, 16:19
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Ayuda con select

Código sql:
Ver original
  1. CREATE OR REPLACE FUNCTION
  2. muncion_mifuncion() RETURNS SETOF
  3. tabla_ejemplo AS
  4. $body$
  5.  
  6. SELECT * FROM tabla_ejemplo;
  7. $body$
  8. LANGUAGE 'sql' VOLATILE CALLED ON NULL INPUT SECURITY
  9. INVOKER;

Dentro de la función ingresas la consulta que quieras y la retornas llamando la función.

Código sql:
Ver original
  1. SELECT *FROM muncion_mifuncion();

Acomodala a tus necesidades.

Un saludo.
__________________
Without data, You are another person with an opinion.
W. Edwads Deming