CREATE PROCEDURE NEW_PROCEDURExxx as declare variable agno integer; begin select extract (year from fecha) from t_fichas into :agno; end