Error procedure holiday

0

Good afternoon guys, I'm trying to create a procedure and I can not solve my error even after several searches on the net, if you can help me, the error that appears is this:

can not format message 13: 393 - message file C: \ WINDOWS \ firebird.msg not found. unsuccessful metadata update. STORE RDB $ PROCEDURES failed. Malformed string.

FIREBIRD 2.5 BANK

--------------------------------------------------------------
--Scrpit de criação da PROCEDURE:

create procedure PROC_INSERIR_DIAS_ANO
as
    declare variable CONT integer;
    declare variable CONT_DATA DATE;
    declare variable COMPARADOR INTEGER;
    declare variable EXTRACT_DATE INTEGER;
begin
    CONT = 1;
-- Coloque o ultimo dia do ano anteior ao que deseja inserir 
    CONT_DATA = cast('31.12.2018' as date);


    -- Loop para inserir todos dias do ano    
    while ( :CONT <= 365 ) do
         begin
         INSERT INTO DIAS_ANO  (iddata, data)
         values (:CONT,  + :cont_data + :CONT);



-- IF'S PARA ATUALIZAR OS FERIADOS NA TABELA DIAS_ANO
            IF(:CONT = 1) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='ANO NOVO' WHERE IDDATA= 1;
            IF(:CONT = 64) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='CARNAVAL' WHERE IDDATA= 64;
            IF(:CONT = 109) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='SEXTA-FEIRA SANTA' WHERE IDDATA= 109;
            IF(:CONT = 111) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='TIRADENTES' WHERE IDDATA= 111;
            IF(:CONT = 123) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='DIA DO TRABALHADOR' WHERE IDDATA= 123;
            IF(:CONT = 173) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='CORPUS CHRISTI' WHERE IDDATA= 173;
            IF(:CONT = 287) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='PADROEIRA DO BRASIL' WHERE IDDATA= 287;
            IF(:CONT = 308) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='FINADOS' WHERE IDDATA= 308;
            IF(:CONT = 321) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='PROCLAMACAO DA REPUBLICA' WHERE IDDATA= 321;
            IF(:CONT = 361) THEN
                UPDATE DIAS_ANO SET UTIL='F', LTV='F', DESCRICAO='NATAL' WHERE IDDATA= 361;

            EXTRACT_DATE =  EXTRACT(WEEKDAY FROM :cont_data);
            -- VERIFICA SE É FIM DE SEMANA E PREENCHE O CAMPO UTIL COM 'F' FALSE
            IF(:EXTRACT_DATE = 6) THEN
                UPDATE DIAS_ANO SET UTIL='T', LTV='T', DESCRICAO='SABADO' WHERE DATA = :cont_data;

         CONT = :CONT + 1;
    END
END

To advance the error is in the line "EXTRACT_DATE = EXTRACT (WEEKDAY FROM: cont_data);" without it I could run the PROCEDURE of good, I believe it is syntax beast error as it says in the error log, but unfortunately not able to get out of place, if you can help me thank you.

    
asked by anonymous 01.12.2018 / 18:28

0 answers