Store Procedure
2
Store Procedure en PostgreSql 8.2
/* CREAR UN SP PARA OBTENER TOTAL IMPORTE POR DESTINO*/
/* CREAR UN SP PARA OBTENER TOTAL IMPORTE POR DESTINO*/
CREATE OR REPLACE FUNCTION spimptotxdes(varchar(50))
RETURNS numeric(9,2)
AS'
DECLARE
vdestino ALIAS FOR $1;
vimptot numeric(9,2);
BEGIN
SELECT INTO vimptot sum(importe)
FROM tembarque
WHERE destino=vdestino;
RETURN vimptot;
END;
' LANGUAGE 'plpgsql';






There are currently no comments for this snippet.