Untitled

mail@pastecode.io avatar
unknown
actionscript
18 days ago
4.7 kB
7
Indexable
Never
Technical Info (only available for developers)
is_internal_error: false
ora_sqlcode: -1438
ora_sqlerrm: ORA-01438: value larger than specified precision allowed for this column ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 55 ORA-06512: at "APEX_230200.WWV_FLOW_CODE_EXEC_PLSQL", line 126 ORA-06512: at "APEX_230200.WWV_FLOW_DYNAMIC_EXEC", line 2647 ORA-06512: at line 22 ORA-06512: at line 22 ORA-06512: at "SYS.DBMS_SYS_SQL", line 2164 ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_230200", line 810 ORA-06512: at "APEX_230200.WWV_FLOW_DYNAMIC_EXEC", line 2607 ORA-06512: at "APEX_230200.WWV_FLOW_CODE_EXEC_PLSQL", line 97 ORA-06512: at "APEX_230200.WWV_FLOW_CODE_EXEC_PLSQL", line 430 ORA-06512: at "APEX_230200.WWV_FLOW_CODE_EXEC", line 614 ORA-06512: at "APEX_230200.WWV_FLOW_EXEC_LOCAL", line 3062 ORA-06512: at "APEX_230200.WWV_FLOW_EXEC", line 2823 ORA-06512: at "APEX_230200.WWV_FLOW_EXEC", line 2861 ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 34 ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 1347 ORA-06512: at "APEX_230200.WWV_FLOW_PLUGIN", line 3635
component.type: APEX_APPLICATION_PAGE_PROCESS
component.id: 395527382059107504
component.name: Subir DHC
error_backtrace:
ORA-06512: at line 22
ORA-06512: at line 22
ORA-06512: at "SYS.DBMS_SYS_SQL", line 2164
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_230200", line 810
ORA-06512: at "APEX_230200.WWV_FLOW_DYNAMIC_EXEC", line 2607
ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 55
ORA-06512: at "APEX_230200.WWV_FLOW_CODE_EXEC_PLSQL", line 126
ORA-06512: at "APEX_230200.WWV_FLOW_DYNAMIC_EXEC", line 2647
ORA-06512: at line 22
ORA-06512: at line 22
ORA-06512: at "SYS.DBMS_SYS_SQL", line 2164
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_230200", line 810
ORA-06512: at "APEX_230200.WWV_FLOW_DYNAMIC_EXEC", line 2607
ORA-06512: at "APEX_230200.WWV_FLOW_CODE_EXEC_PLSQL", line 97
ORA-06512: at "APEX_230200.WWV_FLOW_CODE_EXEC_PLSQL", line 430
ORA-06512: at "APEX_230200.WWV_FLOW_CODE_EXEC", line 614
ORA-06512: at "APEX_230200.WWV_FLOW_EXEC_LOCAL", line 3062
ORA-06512: at "APEX_230200.WWV_FLOW_EXEC", line 2823
ORA-06512: at "APEX_230200.WWV_FLOW_EXEC", line 2861
ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 34
ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 1347
ORA-06512: at "APEX_230200.WWV_FLOW_PLUGIN", line 3635
ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS", line 192
error_statement:
begin DECLARE
    v_nombre_archivo VARCHAR2(100);
    v_tipo_archivo VARCHAR2(40);
    v_id_insertado NUMBER;
BEGIN

    select descripcion into v_tipo_archivo 
    from PLA_TIPOS_DOCUMENTO
    WHERE id = :P87019_ID_TIPOS_DOCUMENTO;

        -- Concatenar el TAG y el nombre del archivo
    :P87019_TAG := 'PLANILLA - ' || v_tipo_archivo;

    v_nombre_archivo := :P87019_ID_EMPLEADO || '-' || REPLACE(v_tipo_archivo, ' ', '_') || '-' || :P87019_DPI || :P87019_EXTENSION;
    
    begin
        for c1 in (select *
        from apex_application_temp_files
        where name = :P87019_FILE)
        loop

            INSERT INTO GESTION_DOCUMENTAL_CORPORATIVA (
                DESCRIPCION_ARCHIVO,
                NOMBRE_ARCHIVO,
                TAG,
                TITULO,
                ID_REFERENCIA,
                CODIGO_MODULO,
                TABLE_NAME,
                ID_CARPETA,
                MIMETYPE,
                THE_FILE
            ) VALUES (
                :P87019_NOMBRE_ARCHIVO,
                :P87019_NOMBRE_ARCHIVO,
                :P87019_TAG,
                v_nombre_archivo,
                :P87019_COD_EMPLEADO,
                :P87019_CODIGO_MODULO,
                'PLA_EMPLEADOS_GESTION_DOCUMENT',
                :P87019_ID_CARPETA,
                c1.mime_type,
                c1.blob_content
            ) RETURNING id INTO v_id_insertado;
            
            -- Inserción en PLA_EMPLEADOS_GESTION_DOCUMENT
            INSERT INTO PLA_EMPLEADOS_GESTION_DOCUMENT (
                dpi,
                id_tipos_documento,
                nombre_documento,
                cod_empleado,
                orden,
                id_documento
            ) VALUES (
                :P87019_DPI,
                :P87019_ID_TIPOS_DOCUMENTO,
                :P87019_NOMBRE_ARCHIVO,
                :P87019_COD_EMPLEADO,
                (
                    SELECT NVL(MAX(orden), 0) + 1 
                    FROM PLA_EMPLEADOS_GESTION_DOCUMENT 
                    WHERE cod_empleado = :P87019_COD_EMPLEADO
                ),
                v_id_insertado
            );

        end loop;
    end;

END;
end;
Leave a Comment