# htakada@xxxxxxxxx / 2005-06-11 08:44:32 -0400: > Hi everybody > > I am trying to write a stored procedure that returns a result set but it is > not working > this is the function: > /// > CREATE OR REPLACE FUNCTION > remisiones.fn_get_total_remitidoxprovision1("numeric") > > RETURNS SETOF record AS > $BODY$ > begin > select rm.provision as provision, > drm.producto as producto, > sum(drm.cantidad) as cantidad > FROM remisiones.remisiones rm, remisiones.detalles_remision drm > WHERE rm.remision = drm.remision and rm.provision = $1 > GROUP BY rm.provision, drm.producto > ORDER BY rm.provision, drm.producto; > end;$BODY$ > > /// http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#AEN32875 -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org