How to use a package as an interface to do DML on a region in a table?

Hello

I want to build a page to perform DML. However, I would use a package that contains the procedures to select, insert, update, and delete. The reason is that there is a one-to-many relationship between the table display and tables in the database.

When the page appears first of all, I wish to draw the SELECTION procedure.
When the user is done with their changes, I want to loop through the rows and perform
the DELETION procedure on all deleted rows and
UPDATE on each changed row procedure.

What is the best way to do it?
Where should I start / learning of reading?

Thank you

Gabor

Hello

This link might help you
http://Apex-SMB.blogspot.com/2008/07/manually-creating-tabular-form.html

BR, Jari

Tags: Database

Similar Questions

  • How to use a package?

    Hello

    I have a package PL/SQL, called UTIL_TABLE, which is owned by the user DNOQ (this user that can contain objects of applications),

    In the UTIL_TABLE package, it includes a procedure, called split_partition, its content is as below,

    /***********************************************
    * Procedure to split a partition of a table *.
    ************************************************/

    PROCEDURE split_partition (tablename VARCHAR2,

    part_name VARCHAR2,
    split_point VARCHAR2,
    first_part VARCHAR2,
    second_part VARCHAR2,
    options of VARCHAR2: = NULL)
    IS

    BEGIN

    priv_rec: = get_privileges (tablename);

    -IF priv_rec.split_part = 'Y' THEN
    IF priv_rec.alter_table = "Y" THEN

    sql_str: = 'ALTER TABLE ' | TableName.
    "SPLIT PARTITION" | part_name | ' To (' | split_point |) ') ' ||
    ' IN (PARTITION ' | first_part |) ',' ||
    'PARTITION | second_part | ') ' ||
    options;

    Util_Table.dynamicSQL (sql_str, err_txt, err_no);

    IF (err_no = 0) THEN
    user_messages (no_error, 'Split Partition');
    ON THE OTHER
    user_messages (other_error, ' error split Partition, s/n call: ' | err_txt);
    END IF;


    ON THE OTHER
    user_messages (auth_error, 'User' |) THE USER |
    'is not allowed to split a Partition in this table, call s/n');
    END IF;

    END;

    If the database as s/n connection, I can do a split a partition of table ACCOUNT (belonged to the DNOQ user), as:

    SQL > ALTER TABLE DONQ. ACCOUNT SPLIT PARTITION ACCOUNT_DEFAULT at (TIMESTAMP'2015-02-08 00:00:00 ') INTO (partition ACCOUNT_P2015WK06, PARTITION ACCOUNT_DEFAULT);

    Modified table.

    -table called partitioning ULTIMATELY owned by DONQ.

    SQL > desc DONQ. ACCOUNT

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    ID NOT NULL NUMBER

    ACCOUNT_NUMBER VARCHAR2 (255)

    PHONE_NUMBER VARCHAR2 (255)

    SELECTION_TIME TIMESTAMP (6) = > vary us the partition using this column!

    FILE_ID VARCHAR2 (255)

    CSL_NAME VARCHAR2 (255)

    QUEUE_NAME VARCHAR2 (255)

    RESULT_CODE_CLASS VARCHAR2 (255)

    RESULT_CODE VARCHAR2 (255)

    RESULT_CODE_ACTION VARCHAR2 (255)

    ACCOUNT_STATUS VARCHAR2 (255)

    AGENT_ID_RESULT_TIME TIMESTAMP (6)

    AGENT_ID VARCHAR2 (64)

    NUMBER OF CALL_DURATION

    TENANT_ID NOT NULL NUMBER

    I'm a user of the application, called DONQ_APP, it has all the DML privileges against table ACCOUNT, then log in as DONQ_APP, we try to use the procedure split_partition to divide a new partition.

    SQL > alter session set current_schema = DONQ_APP;

    Modified session.

    SQL > exec UTIL_TABLE.split_partition ('ACCOUNT', 'ACCOUNT_DEFAULT', ' (TIMESTAMP'2015-02-15 00:00:00 'TIMESTAMP' 2015-02-15 00:00:00 ') "', 'ACCOUNT_P2015WK07', ' ACCOUNT_DEFAULTe ', 'ACCOUNT_P2015WK07', 'ACCOUNT_DEFAULT');

    SP2-0552: Bind variable '00' not declared.

    the UTIL_TABLE package is valid.

    How can I do to use this procedure correctly?

    I thank very you much in advance!


    You deleted your last response and my response, so I'll post it again.

    You said in your last answer that you receive an error message on the user SYS is not in your privilege table.

    As I told you before that the message that you receive are generated by YOUR function you call this line:

    Util_Table.dynamicSQL (sql_str, err_txt, err_no);

    This feature (your code) accesses YOUR privilege table. Your last answer deleted posted INSERT statements for this privilege table. This table has the privilege and the USER that the user has. The inserts did NOT all the lines for the SYS user if YOUR code has caused an exception because you can't find all the lines in your table for the user SYS.

    Unfortunately, you did not check for this exception so it caused your code shown above to fail.

    You must follow best practices when you develop a code, but especially for dynamic code.

    1. ALWAYS print the query you build dynamically

    2. ALWAYS run/test/tune this query manually until it runs and correctly

    3. ALWAYS intercept all exceptions that might occur and deal with them appropriately.

    If you do the above, you will see what is the problem with your query string dynamically built.

  • How to use "full join" in ODI interface

    I need to join two tables using full join. Then, when I do drag table columns (join build) and mark the left and right join (get full join):
    + (All lines of OSS_NCELLREL (OSS_NCELLREL), including the lines not matched with lines of OSS_NECELASS (OSS_NECELASS) and all lines of OSS_NECELASS (OSS_NECELASS) including the lines not matched with OSS_NCELLREL (OSS_NCELLREL) +)
    I get the following error:
    The source of the diagram Panel: Clause set to join full on a technology that does not support full joins

    I use Oracle DB tables in the same PB.

    Help! What I've done wrong?

    Hello

    You need work in the topology Manager.

    Please follow the steps below

    1. change the 'Oracle' in the tree of the physical Architecture technology.
    2 If ' technology Defintion tab select button radio "Ordered (Sql ISO).
    3. in the "SQL Tab" technology do the following settings:
    -Clause location: of
    -Media supported clauses: check
    -Inside: check, type INNER JOIN
    -Cross: check, type CROSS JOIN
    -Left outside: check, type LEFT OUTER JOIN
    -Right outside: check, type RIGHT OUTER JOIN
    -External more info: check, type FULL OUTER JOIN

    PS: Please take a techno Oracle backup before editing. ;)

    Thank you
    G

    Published by: Gurusank on November 27, 2008 21:05

  • How to use the API of the IOM in Self Service identity custom region

    Hi all

    I developed a custom in Self Service identity using this guide area: customization of the Interface - 11 g Release 2 (11.1.2.1.0)

    Inside this area, I have a simple form that allows the creation of users. This form uses the API of the IOM, in particular the following line:

    UserManager usermgr = Platform.getService(UserManager.class);
    

    The error I got is:

    < error > < oracle.iam.platform.utils.SpringBeanFactory > < BEA-000000 > < parsin instantiation Spring Bean Factory Failed.IOExceptiong XML document resource path of class [META-INF/iam-spring-config. XML]; nested exception is java.io.FileNotFoundException: resource path of class [META-INF/AIm-spring-config.] XML] could not be opened because there is no >

    I use it because I think that I am inside the ISS. For this reason I don't want to use the client method to retrieve the UserManager (which obviously works):

            String ctxFactory = "weblogic.jndi.WLInitialContextFactory";
            String serverURL = "t3://" + HOSTNAME + ":" + PORT;
            
            Hashtable env = new Hashtable();
            env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, ctxFactory);
            env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, serverURL);
            
            OIMClient oimClient = new OIMClient(env);
            try {
                oimClient.login(OIM_USERNAME, OIM_PASSWORD.toCharArray());
            } catch(LoginException e) {
                e.printStackTrace();
            }
            UserManager usermgr = client.getService(UserManager.class);
    

    It is possible to use the UserManager methods in this case?

    Thanks in advance for your help.

    Manual

    Solved.

    Just replace

    UserManager usrmgr = Platform.getService(UserManager.class);
    

    with

    UserManager usermgr = OIMClientFactory.getUserManager();
    

    Manual

  • using Record statistics for session/Interface inside the package

    Oracle DB / ODI.
    I have a package starting with Interface.
    In the second step, I want to know how many records has been inserted/updated the first interface. Let that say those numbers will be used on the second interface.
    How can I do? Is it possible to access this information inside the package?
    Something similar to SQL % ROWCOUNT in ODI?

    Try this in variable refresh

    Select to_number (< %="odiRef.getPrevStepLog("INSERT_COUNT")%">) + to_number (<%=odiRef.getPrevStepLog("UPDATE_COUNT")%>) of the double

  • How to know the tables used in packages of a schema.

    How to know the tables used in packages of a pattern that I have connected.

    SELECT DISTINCT referenced_owner, referenced_name

    Of all_dependencies

    Owner WHERE = "MY_USER_NAME".

    AND type ('PACKAGE', 'BODY of PACKAGE')

    AND referenced_type = 'TABLE '.

  • If I subscribe to the applications Adobe CC everyone (students and teachers), how many computers can I use the package on?

    If I subscribe to the applications Adobe CC all (students and teachers).

    How many computers can I use the package?

    Please check the FAQ - Licensing FAQ: can I install Creative Cloud on several computers?

    Thank you

    Bev

  • How to use JSP as user interface

    Hello

    I use 10gR 3 OBPM.
    How to use JSP as a BPM project user interface

    Thanks in advance.

    Edited by: 804625 on October 22, 2010 22:58

    Hi Sid,

    First import the JSP page in your BPM workspace.
    In the flow of the screen where you have the interactive activity (you want to attach the JSP) declare a variable of type BPM (say jspObj) instance active then in activity interactive properties select the interactive BPM call, select the BPM object you defined (say jspObj) and select the Jsp custom radio button and select the jsp page in the customJSP folder.

    To make communication between the JSP and the BPM object, you must use the object of the BPM (say jspObj) in your JSP page.

    for example the text field using as follows:

    value ="" / > ".

    I hope this help you

    Sidonie

  • How to use a function inside the package?

    Hello

    You will need to convert weight unit of kilogram kips when filling out the weight values into a temporary table. In our database, schema there is a function called convert_units is available.
    How could I use this feature in my package? My package is also resides in the same database schema.

    Here, I pasted the function.
         convert_units
       (
         in_base_unit_id       NUMBER,
         in_conversion_unit_id NUMBER,
         in_value              NUMBER
       ) RETURN NUMBER AS
    CURSOR unit_cur IS
      SELECT *
      FROM units_conversion
      WHERE base_unit_id = in_base_unit_id
        AND conversion_unit_id = in_conversion_unit_id;
    unit_rec unit_cur%ROWTYPE;
    BEGIN
      OPEN unit_cur;
      FETCH unit_cur INTO unit_rec;
      IF unit_cur%NOTFOUND THEN
        unit_rec := NULL;
      END IF;
      CLOSE unit_cur;
      RETURN (in_value+unit_rec.pre_adjust_add)*(unit_rec.rate);
    END convert_units;

    Hello

    It seems that the first two arguments of this function are ID in the units_conversion table. If you know this id = 1234 means kilograms, 9876 means kips, then you can do things like:

    wt_kips := convert_units (1234, 9876, wt_kilograms);
    

    or

    INSERT INTO tmp_table ( ..., weight_val,                               ...)
           VALUES           ( ..., convert_units (1234, 9876, wt_kilograms), ...);
    

    I can't just look at the code which could be any valid ID. I'm not even sure of the order of the arguments. I hope you have instructions on how to use the function.

    If the function is in a package named pk_xyz (a different package to the one in which you call it), add the name of the package, like this

    wt_kips := pk_xyz.convert_units (1234, 9876, wt_kilograms);
    
  • After replacing the motherboard of PC how can use the license package, is the same hard drive.

    Mr President, our pc is repaired & change the motherboard and now how to use the product under license of photoshop

    It could be cleaner if you uninstall the products in question, using the CS cleanup tool and then contact Adobe technical support via chat and ask to reset your activations before install and activate the software again.

    Adobe Creative Suite cleanup tool

    helps resolve installation for CS3 thru CS6 and creative cloud problems

    http://www.Adobe.com/support/contact/cscleanertool.html

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

    Before you uninstall, you can see if you can extract the serial number in case you don't have it at hand.

    If it's a Windows machine, and then try running Belarc Advisor

    http://www.Belarc.com/free_download.html

    For a Mac, you can try:

    https://Mac-product-key-Finder.com/

  • How to use outside of class in the packed library plugins

    I found the article very useful to Michael Lacasse (https://decibel.ni.com/content/docs/DOC-19176) how to use the library packaged as plugins. This approach makes the most sense when you try to distribute additional code after that your executable is already installed.

    My problem is that when I try to use a class from the main code in a plugin, plugins no longer works. Ideally, I would have liked the parent plugin interface to inherit from a class that is used in the main code, either by using the class as parameter of the plugin would be the next best thing.

    I had several mistakes, some runtime (#1448) or at the time of publishing ("VI it does not match other screws in the method: connector side terminal (s)"). I set to use clusters to transfer data to the plugins.

    My question is: is it possible to use a class defined in the main code in a packed-project-library, either inherited or as a parameter? If Yes, do you have any examples?

    It is not made with real CLASS structures, but I do the same with PPLs.

    Don't try to inherit from something in the MAIN host.

    Create the ancestor class in a separate PPL.

    Use it for the most PART, as it is.

    Inherit it in your modules.

  • How to use the global variable in the table target?

    Hello

    I am trying to load several files into a single interface. the data is loaded successfully. 92. the files are there. for this I used variables and package.

    My requrement is 92 files of data loaded into the target table. I want to know what data from file.

    to this I added a column (filename) to the existing target table.

    If I used joints (not same condition), its totally wrong. all file names are coming.

    Please see the following screenshots.

    err27.jpg

    exit; target table.

    err26.jpg

    in fact in the target table. first 10 lines are coming from file.i.e first _ACCOUNT_LIMIT_511.TXT. but all the files names are coming.

    I'm confuse. After the first data file inserted then insert second data file. in that all file names are coming. Please help me.

    I thought that the global variable is preferable to identify the data came from which file.

    to do this, the global variable is used in the target table. I don't always have my exit.

    Please help me.

    Thanks in advance.

    err25.jpg

    Hello

    You can use the same way, how you use the project variable, just you have to do a thin is #GLOBAL.variable_name for example: #GLOBAL. SMART_AL_FILE_NAME_S

    Note: Make sure you that while you use one variable overall in interface, indicator should be staged as you chose above the screen

    hope this helps you

    Kind regards

    Phanikanth

  • How to use oracle.jbo.client.remote.ejib. *?

    Hello
    I think that the oracle.jbo.client.remote.ejib. * package to simplify the interface EJB citing, right? But how to use oracle.jbo.client.remote.ejib. *? example of use code is perfect! Thank you!

    Published by: EdwardXiao on September 18, 2011 19:29

    I'm not sure about the question that you asked... but if you are looking for use, see
    http://radio-weblogs.com/0118231/stories/2004/05/07/handcodingDynamicDiscoveryOfEjbdeployedAppmodule.html

  • How to use the recovery on Satellite A215-S7422 DVDs

    Hello

    I have A215-S7422
    First of all, I like the Vista Home Premium, until I had a few problems with my operating system.

    I'm downgrading my laptop for Windows XP SP2 home edition.
    I formatted all the HARD drive, to make a few partitions.
    A few weeks later I tried to Vista using the DVD recovery system which is included in the package when I bought the camera.
    Unfortunately, the DVD without being detected in the first over.

    Do you have any idea how to use this recovery DVD?
    It is any special program to activate the recovery DVDs?

    Please, help me.

    May I ask why create you double assignments?
    You already asked this here:
    http://forums.computers.Toshiba-Europe.com/forums/message.jspa?MessageID=140003

    Secondly, as already described in different threads, you have to boot from the recovery DVD and this will begin the new installation image.

  • How to use USB CAN 8473, code for the basic example

    Hi all.

    I use NEITHER USB-8473 CAN transmit and receive data via CAN.

    I have traveled a lot a lot of pages related to this and realized that the API will not work for USB - CAN. Can someone tell me please how to use this USB-8473.

    Maybe an exaple program would help me. (It is not PCI it we USB,)

    Thank you.

    You will need to install NI-CAN, if you don't have already done.  This is the API that you can use with a 8473.  After installing, open Explorer Measurement & Automation and make sure that you can see the 8473 under your devices.

    Here is a sample VI (LabVIEW 2009) that I wrote for another developer to make the CAN communication basic tests.  You enter a package CAN as a series of hexadecimal bytes separated by spaces, and it will send it to you.  It displays every CAN packet it receives in the same format.

Maybe you are looking for