1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Make procedure

Discussion in 'SQL PL/SQL' started by m_r_a, Feb 1, 2017.

  1. m_r_a

    m_r_a Starter

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    10
    Location:
    Palestine
    Hello,

    I have some statements that I need to schedule in a procedure.


    Drop Table u_system.emp_load;
    CREATE TABLE u_system.emp_load
    (employee_number CHAR(5),
    employee_atten_time TIMESTAMP,
    machine_number CHAR(3),
    in_out CHAR(2)
    )
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY user_dir
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY NEWLINE
    FIELDS (employee_number CHAR(4),
    employee_atten_time CHAR(20) date_format TIMESTAMP mask "dd/mm/yyyy hh24:mi:ss",
    machine_number CHAR(4),
    in_out CHAR(1)
    )
    )
    LOCATION ('emp2.dat')
    );
    insert into u_system.emp_attend(employee_number,employee_atten_time,machine_number,in_out)
    select * from u_system.emp_load;
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    771
    Likes Received:
    145
    Trophy Points:
    830
    Location:
    Russian Federation
    hi.
    what is your oracle version?
    you want to create a procedure populating the table from a file(external table)?then you can use this procedure in a job.

    how often do you plan to run the job?
    how do you plan to run: automatically or manually?

    these links may be useful:
    1) doc: dbms_scheduler
    2) dbms_scheduler program