How to Use the Currency Rate Update Tool

This tool allows you to update currency rates in the Oracle database by generating the necessary SQL queries. Follow the steps below:

Workflow

  1. Input Currency Data: In the form on the main page, paste the currency data in the following format:
    CurrencyCode BuyRate SellRate Date
    For example: USD 1.123 1.145 2025-02-16
    Each currency entry should be on a new line.
  2. Generate SQL Queries: After pasting the data, click on the "Generate SQL Queries" button. The tool will generate the required UPDATE and INSERT SQL queries based on your input.
  3. Execute the Queries: Copy the generated queries and paste them into your Oracle SQL client to execute the update and insert operations in the database.

Example

If you input the following data:

    USD 1.123 1.145 2025-02-16
    EUR 0.898 0.912 2025-02-16
    GBP 1.390 1.402 2025-02-16
    

The tool will generate the following SQL queries for you to copy:

    UPDATE CURM SET CURM_BUY_RATE = 1.123, CURM_SELL_RATE = 1.145, CURM_UPDT_DT = TO_DATE('2025-02-16', 'YYYY-MM-DD') WHERE CURM_CURR_CD = 'USD';
    INSERT INTO CURH (CURH_CURR_CD, CURH_CREA_DT, CURH_EFF_DT, CURH_BUY_RATE, CURH_SELL_RATE) VALUES ('USD', TO_DATE('2025-02-16', 'YYYY-MM-DD'), TO_DATE('2025-02-16', 'YYYY-MM-DD'), 1.123, 1.145);

    UPDATE CURM SET CURM_BUY_RATE = 0.898, CURM_SELL_RATE = 0.912, CURM_UPDT_DT = TO_DATE('2025-02-16', 'YYYY-MM-DD') WHERE CURM_CURR_CD = 'EUR';
    INSERT INTO CURH (CURH_CURR_CD, CURH_CREA_DT, CURH_EFF_DT, CURH_BUY_RATE, CURH_SELL_RATE) VALUES ('EUR', TO_DATE('2025-02-16', 'YYYY-MM-DD'), TO_DATE('2025-02-16', 'YYYY-MM-DD'), 0.898, 0.912);

    UPDATE CURM SET CURM_BUY_RATE = 1.390, CURM_SELL_RATE = 1.402, CURM_UPDT_DT = TO_DATE('2025-02-16', 'YYYY-MM-DD') WHERE CURM_CURR_CD = 'GBP';
    INSERT INTO CURH (CURH_CURR_CD, CURH_CREA_DT, CURH_EFF_DT, CURH_BUY_RATE, CURH_SELL_RATE) VALUES ('GBP', TO_DATE('2025-02-16', 'YYYY-MM-DD'), TO_DATE('2025-02-16', 'YYYY-MM-DD'), 1.390, 1.402);