Buenas .

Estoy creando una funcion para borrar y me sale este error :

ERROR:  error de sintaxis en o cerca de «$body$
DECLARE
begin

DELETE FROM almacen_crudo WHERE seq_tejido_ejec_detalle = $1 ;

    RETURN;

end;
$body$»
LINE 1: ...E FUNCTION public.borrar_rollos ( seq_rollo integer ) $body$


Ya intente varias cosas y en la red no encuentro algun ejemplo.

Gracias por su ayuda...

CREATE OR REPLACE FUNCTION public.borrar_rollos (

  seq_rollo integer
)

$body$
DECLARE
begin

DELETE FROM almacen WHERE seq_tejido_ejec_detalle = $1 ;

    RETURN;

end;
$body$
LANGUAGE 'plpgsql'
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOKER
COST 100 ROWS 1000;

Reply via email to