update the object attribute table

Hi all

I'm trying to populate an attribute on a table of objects and need some ideas on how to do this after an update or insert on
two relational tables?

The object table is defined as follows:
create or replace type ty_gli as object
(SOB_ID           number
,GROUP_ID         number
,SOURCE_NAME      varchar2(25)
,INTERFACE_RUN_ID number
,AUTOPOST_ID      number)
/

create or replace type tb_gli as table of ty_gli
/
The object table is in bulk sampled in an update and The GROUP_ID is applied at the same time as follows:
update GL_Interface gli
set    gli.Group_ID  =  Gl_Interface_Control_S.nextval
where  gli.Accounting_Date <= l_Max_Rate_Date
and    gli.Set_of_Books_ID = p_SOB_ID
returning ty_GLI (gli.Set_Of_Books_ID, gli.Group_ID, gli.User_JE_Source_Name, 0, 0)
bulk collect into l_GLI_Tab;
An insert then follows, in the course of which the INTERFACE_RUN_ID is obtained from a sequence
insert into GL_Interface_Control ( JE_Source_Name
                                  ,Group_ID
                                  ,Set_Of_Books_ID
                                  ,Interface_Run_ID)
                           (select gli.Source_Name
                                  ,gli.Group_ID
                                  ,gli.SOB_ID
                                  ,GL_Journal_Import_S.nextval
                            from   table(l_GLI_Tab) gli);
At this point in the code, preferably before or after insertion.
I would like to each attribute of the object INTERFACE_RUN_ID table l_GLI_Tab to
equal to the value inserted into GL_INTERFACE_CONTROL, which has been GL_JOURNAL_IMPORT_S.NEXTVAL

I thought to do before inserting it in the update, but it doesn't work!
returning ty_GLI (gli.Set_Of_Books_ID, gli.Group_ID, gli.User_JE_Source_Name, GL_Journal_Import_S.nextval, 0)
/

I then thought about that;
update 
 (select gli.Group_ID
        ,gli.Accounting_Date
        ,gli.Set_of_Books_ID
        ,GL_Journal_Import_S.nextval as Interface_Control_ID
        GL_Interface gli
  set    gli.Group_ID  =  Gl_Interface_Control_S.nextval
  where  gli.Accounting_Date <= l_Max_Rate_Date
  and    gli.Set_of_Books_ID = p_SOB_ID) gli
set gli.Set_of_Books_ID = p_SOB_ID
returning ty_GLI (gli.Set_Of_Books_ID, gli.Group_ID, gli.User_JE_Source_Name, gli.Interface_Control_ID, 0)
but who doesn't either!

Any help would be appreciated!

THX

P;

I thought to do before inserting it in the update, but it doesn't work!

returning ty_GLI (gli.Set_Of_Books_ID, gli.Group_ID, gli.User_JE_Source_Name, GL_Journal_Import_S.nextval, 0)

You just need a little change here. Create a function like this

create or replace function Get_GL_Journal_Import_S return integer
as
begin
  return GL_Journal_Import_S.nextval;
end;
/

use it in your code

 returning ty_GLI (gli.Set_Of_Books_ID, gli.Group_ID, gli.User_JE_Source_Name, Get_GL_Journal_Import_S, 0)

It should work correctly.

Tags: Database

Similar Questions

  • How to query the object attribute changed his mind in another display object

    JDeveloper 10.1.3.4

    My requirement is I want to be able to query an object (entity based) view on a nonkey attribute where the value I'm looking on can either be in the database on an existing record or only been experienced by updating a different point of view object based on the same entity (and still commit).

    When you query the second display of a value object just updated via a different point of view object, the second view object always returns no rows. I thought that the process is:

    EntityA
    ViewObjectA based on EntityA
    ViewObjectB based on EntityA

    ViewObjectA - line query with the key = 123. update the attribute Y with value 456 (attribute Y in the null database). Feature for EntityA cache, touch 123, attribute is updated with the value 456
    ViewObjectB - line application with attribute = y. wait record in EntityA just updated cache to be returned. Instead, nothing is returned

    Here is the code I was using (where RandScheduleEdit and RandScheduleSearch are the same view the entity RandSchedule object-based objects)
      public static void main(String[] args) {
        String        amDef = "test.cache.model.AppModule";
        String        config = "AppModuleLocal";
        ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
        
        ViewObject rsEdit = am.findViewObject("RandScheduleEdit");
        Key rsKey = new Key(new Object[]{40});
        Row[] rsEditRows = rsEdit.findByKey(rsKey,1);
        Row rsEditRow = rsEditRows[0];    
        rsEditRow.setAttribute("SId", new Number(7827));
        
        ViewObject rsSearch = am.findViewObject("RandScheduleSearch");
        rsSearch.setWhereClause("S_ID = :SId");
        rsSearch.defineNamedWhereClauseParam("SId", null, null);
        rsSearch.setNamedWhereClauseParam("SId",new Number(7827));
        rsSearch.executeQuery();
        Row rsSearchRow = rsSearch.first();
        
        Configuration.releaseRootApplicationModule(am, true);
      }
    Why not rsSearch finds the S_ID = 7827 record? It seems to only be interviewing new records in the database and ignoring the record updated in cache just updated?

    Any help much appreciated.

    See you soon,.
    Brent

    rsSearch.setNamedWhereClauseParam ("SId", new Number (7827));

    This might help:
    rsSearch.setQueryMode (ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);

    rsSearch.executeQuery ();

  • What api to update the additional attributes of the employee

    Hi all

    I created all of my employees using hr_employee_api.create_employee, now I need to update in bulk the additional attributes for each employee (e.g. attribut1, attribut2... etc). What api should I use to do.

    Thanks and greetings

    Zulfiqar haider

    Hello
    I think you can use HR_PERSON_API. UPDATE_US_PERSON to update the attribute columns. Please check in your test before proceeding
    You can use it for your final update in bulk. Hope this helps you.

    Thank you
    Satin

  • cfloginuser - roles of the permissions of the object.  Table?

    Hello, wonderfully helpful people!

    Imagine a project that has a corporate structure. Some users may see only, some users may see a (or several) departments and perhaps an additional user or two. Some users can see everything. Etc.

    Now expand this option to include a lot of companies, each with their unique business structures, and only one person has access from arbitrary objects (apparently) in several companies.

    Basically, the user authorization is at the level of the object; It is not a * role *. And, to add a little extra fun, I know not all the objects involved - it is dynamic - and these objects do not have a unique id between them.

    What I would put roles is a list of lists. a list of each type of object that contains the ID for this object to which the user has access. Perhaps the first value is the object type, and the rest are the identifiers. Example:
    {1,12,13}, {2,12,52}, {3,12,42}

    I'm doing a work around to make the list, in order to use the IsUserInRole and other whatnot (although it's a bit tedious):
    1_12 1_13 2_12, 2_52, 3_12, 3_42

    So:
    1. anyone who processes the permissions at the object level using cflogin? How did you do?
    2. What suggestions could do to improve it?

    Thank you in advance! Surely there is a better way to do it.

    Best wishes
    CAT

    Sorry no good tutorials I especially figured it out by trial and error.
    I find that security systems tend to be very personally and vary
    wildly enforcement and organization to another.

    The basic concept is a CFC that stores the relevant information and the
    functions appropriate to retrieve this information in the desired direction
    format. A big question is do you want the EFA to be aware of the user
    information point of sale or to be factored out in another layer.
    For easy readability, I'll provide the skeleton of a CFC based which is
    unaware of the data store but the roles are passed. I also have
    built this such as, by the way just to a user, the ID of the item
    generates all the data of the user.



    variables. Name = "";
    variables. Roles = structNew();




    variables. Name = arguments.name;
    variables. Roles = arguments.roles;








    It is extremely bare bones and need considerable flesh but off
    It should give you an idea.

    Then you just replace the
    or function tag to call this function to initialize CFC by the way
    the required arguments. And thisObj.isUserInRole call wherever you are
    isUserInRole() appeal.

  • Update the object programmatically view the data in

    I want to update database registration. Now, I'll have the view object, I have to change the folder for example id = 101 name = john is my old record, my new record will be id = 101 name = sundar.
    I want to do it programmatically.

    am.getDBTransaction () .commit ();

  • [tools help] what tool can be used to move files? and update the row in table?

    I need help to find out what tool can help me in the next task:
    #1 moving file
    situation: after the extraction of a file, the file is moved to another directory.

    Update SQL #2
    Situation: what mapping tool can be used to update existing record / execute sql
    as UPDATED VALUE TABLE WHERE... or REMOVE...

    Take the employee data form table and connect name, id, "incative" (from constant) to the target table.
    Replace the update target property, and then set the properties of column-level.

    Find out what

    Update/Insert into mapping

    See you soon
    Katia

  • DAQmx continually update the example output table

    Hello

    I use the example Synch_AI-AO in the DAQmx folder and it works very well for sine waves, pulse, triangle waves, or whatever it is periodic. However, I would like to output an array of noise which produced WhiteNoise, which is continually updated service every N seconds.

    I tried to call the StopCallback and the StartCallback, then after delaying for N seconds, but since I have to be running when I call these callbacks I find myself coming back to the place where I called them before going back to them (like recursion), who kills my program.

    Is there a way update output so that it does not have the question of the recurrence which blocks my program?

    Thank you.

    Hi EricJR,

    Instead of calling the functions StopCallback and StartCallback, have you tried to call the DAQmxWriteAnalogF64 function whenever new samples are generated?

  • LR "Synchronize the folder" does not update the sides/attributes of the bridge

    I have the latest version of 'CC' Pshop, LR and bridge.

    I find it easier to manage the sides in Bridge, assign keywords, etc. and then perform a synchronization of LR.  Before about a week before I could rate my photos in Bridge, for instance, a rating of "2 stars", then in LR, (pointing to the same physical folder where pictures (RAW and JPG) right click on the folder and select "synchronize files" - and the sides would be updated, so-called '0 star' to '2 stars'.)

    This feature no longer works.  I'm not sure that the upgrade had nothing to do with it.  I did not change the way in which this bridge or LR handle meta-data.

    Any help please?

    Default Lightroom reads and writes metadata to the catalog file, it can also write some of the data in an xmp file if you choose to do so.

    Bridge and ACR however only reads and writes the xmp sidecar or in the header of the file.

    If you import an image in Lightroom and there is metadata in a file this Lightroom xmp will read and apply the data. After you import the files if you update catalog information in Lightroom, you need Lightroom to do. (Menu bar > metadata > read metadata from file.)

    I don't know if if that happens when you choose to synchronize a folder, if there are new files to import, it will read the data but I think it's maybe not done to files that are already in the catalog.

  • Discover changes to the object attribute - value old &amp; new value

    JDeveloper: 11.1.1.7.1

    I'm trying to manage a Cancel button that changes rollsback to the previous state (not necessarily state DB). If an attribute in my VO passes from the

    A (DB State)-> B-> C

    This scenario is a UI master-child - where, in the transition is on the child entity in a popup with options save/Cancel. The real DB except happens however on the master file.

    In this regard, if a user changes from a

    A (DB State)-> B-> C

    on the child by clicking on save on the popup of the child, how can we return to State B, which is the last valid state for this child.

    Takes VO.refresh (REFRESH_UNDO_CHANGES) he State A - is therefore not a valid application.

    After traveling a lot, wonder if it is a gap in the ADF - esp. around usecases Master-child where the actual validation happens at the master level.

    User, this is a misunderstanding on the side. ADF has only the status of the db and no other intermediate States. A transaction is performed on all changes since the last commit of a module of application taking the transaction. Tuts had nothing to do with the relationship master detail.

    We could call this behavior a flaw in the adf, but as long as no one calls for an enhancement request with support.oracle.com which could be implemented, ADF works as designed and documented.

    Timo

  • Y at - there any API in EBS for updating the attributes columns on lines IN... ?

    Hi all

    I'm looking for some API which will help me to update the columns attribute on the lines of PO. I searched in metalink also but I have not found any idea for that.
    Help, please.



    Thank you
    Ravi Raj.

    API in general do not update or manipulate ATTRIBUTE columns from these customer data defined in the store. You will need to update these columns directly.

    year https://forums.Oracle.com/forums/Search.jspa?threadID=&q=attribute+and+API+and+Update&objid=C3&DateRange=Last & userID = & numResults = 15 & rankBy = 10001

    HTH
    Srini

  • Views of the object using

    I have a structure of type object as shown below:
    < pre >
    CREATE TYPE address_t AS OBJECT
    (
    Street VARCHAR2 (20).
    City VARCHAR2 (10),
    State CHAR (2),
    zip VARCHAR2 (10)
    );


    CREATE TYPE employee_t AS OBJECT
    (
    ENO NUMBER,
    Ename VARCHAR2 (20).
    NUMBER of salary
    );

    CREATE TYPE employee_list_t AS TABLE of employee_t;

    CREATE TYPE dept_t AS OBJECT
    (deptno NUMBER,
    deptName VARHCAR2 (20),
    address address_t,
    emp_list employee_list_t
    );

    CREATE VIEW dept_t WITH the IDENTIFIER of OBJECT (deptno) AS dept_view
    SELECT d.deptno, d.deptname,
    address_t (d.deptstreet, d.deptcity, d.deptstate, d.deptzip) AS deptaddr,
    CAST (TYPE MULTISET)
    SELECT e.empno, e.empname, e.salary
    FROM emp e
    WHERE e.deptno = d.deptno)
    AS employee_list_t)
    AS emp_list
    DEPT d;

    < / pre >

    What I want to do is to use a variable of type dept_view % ROWTYPE. How this can be done. I get the error as
    PL/SQL: ORA-00947: not enough values
    < pre >
    DECLARE
    y employee_list_t: = employee_list_t (employee_t (NULL, NULL, NULL));
    x dept_t: = dept_t (NULL, NULL, address_t (NULL, NULL, NULL, NULL), y);
    BEGIN
    SELECT *.
    X
    OF dept_view
    WHERE ROWNUM = 1;
    END;
    < / pre >

    In circumstances where Oracle treats attributes of type object as separate columns (tables of objects, views of the object, functions table), use the operator (VALUE or virtual OBJECT_VALUE) (previously SYS_NC_ROWINFO$) to access the entire object type, for example

    DECLARE
       x dept_t;
    BEGIN
       SELECT VALUE (dv)
         INTO x
         FROM dept_view dv
        WHERE ROWNUM = 1;
    END;
    /
    

    DECLARE
    x dept_t;
    BEGIN
    SELECT dv.object_value
    X
    THE dv dept_view
    WHERE ROWNUM = 1;
    END;
    /

    Note: of course you can rebuild the object type also Cool online did, but there is a risk of an additional burden and maintenance, not to mention the issue of substituted etc. builders.

    Padders

  • problem updating the contract line using OKC_CONTRACT_PVT.update_contract_line

    Hi all

    I am facing a problem trying to update the end of contract line dateusing the api OKC_CONTRACT_PVT.update_contract_line. When executing the procedure that calls the api it returns the State S without error and also update the table of base that is OKC_K_LINE_B with new end date successfully.

    The problem is that whenever I'm if commit the changes to the front end, application - contract line record gets endangered. What is happening to all instances of the element. Here are the settings I am passing through the api,

    p_chrv_rec.ID: = < id for row in the okc_k_lines_b table >;
    p_chrv_rec.end_date: = < new_end_date >;
    p_chrv_rec. VALIDATE_YN: = 'N'; -I don't want the api to validate attributes

    Please note that the api is correctly updating the record base table but not able to display in the application. I tried to compare the same record before and after the update to confirm if no value of the indicator is is changed due to the record does not appear in applications. but there is no such changes except the new date and the annualiazed_factor. Can is it you pls let me know no work around as if any option profile must be changed to achieve the same.

    Navigation to the im application to check the update new end date of contract line is:

    Oracle Install Based Agent user-> Instance element-> contracts

    Thanks in advance.

    Kind regards
    Hespel.

    Published by: user10545574 on July 8, 2010 06:56

    Hello

    Shouldn't you be using the public api (OKC_CONTRACT_PUB) rather than the private sector? By directly using the package private, you are probably bypassing some features that could cause problems like the one you are talking about.

    Kind regards.

  • problem updating the ini file ini file

    I get the ip address of the user's input and to replace the old IP in the .ini to the last ip address file but the problem is when a user enter the IP and I write it in my ini file it does not at once, but if I do it twise in calling the same function of my command button twise then my ini file is updated , it is the strage iniwrite function returnes success although on first attempt. I checked with breakpoint, but when I do it twise, then it is done, please guide me in detail, I am really amayzed by this strange behavior...

    I already gave you the exact order of the functions in my previous message!

    Ini file tool generates an object in memory that allows you to store and locate the values. This object can be filled in reading a file on the disk; Similarly, it can be saved to a file on disk. This is the very first operation and the last to perform if you want a picture to date of your values on the disk. There are three layers to consider:

    1. The file on the disk

    2. The IniText object in memory

    3. The variables specific to your program

    With this in mind, the right order to update the file on the disk so that it reflects the value that your variables have in memory is:

    Ini_New create the object in memory

    Ini_ReadFromFile fill it with the contents of the disc

    Ini_get('sendmail_from') read of the idebugprogramnode2 memory in your program variables

    Here tou can update the values of program

    Ini_Put update the object of memory with the contents of your variables

    Ini_WriteToFile save everything on the disc

    Memory Ini_Dispose clear

    As you save on disk before you call the Ini_Put functions, the disk image is not updated

  • Update the database

    Hello everyone
    I was a novice, recently made an update of database program has encountered difficulties, and to view the data in a table to view and change any value, but how do I change the data in the table after a single batch update the corresponding database table (similar to a storage operation library and warehouse) , I hope you expert advice, there are examples of the theme or reference to find out the best thanks!

    Help-> find examples-> database

    /Y

  • The use of tables of database for authentication in the ADF

    Hello

    I need to use my user table in the database for authentication in ADF (adf 11.1.2).

    I have 3 categories: agent admin and user is unique, each has its own page, logging, the application checks the type of user and directs its jsf task or the page of the jsf page flow.

    I have a user with the type attribute table

    HOW CAN I MAKE THIS PRAYER.

    Hello

    See links below.

    Whatever Fusion Middleware: Tables database user to implement authentication in the ADF

    Java / Oracle SOA blog: the use of tables of database as in WebLogic authentication provider

Maybe you are looking for

  • Meassages in and sent box last for 14 days.

    How can I increase?

  • Re: Satellite A110 - BIOS password

    Hello yesterday I made in the configuration, a built HARD disk and a user password. I took both the same. but now, when I try to log in, it is false.Without password I started not in the installer.What can I do? My BIOS is Phoenix Version V1.30. And

  • How to define the initial Conditions of transfer function

    Hello I need set the initial of my transfer function value so that it starts to 0.7778 instead of from 0. [My transfer function is 1 / (3.3 s + 1)] I found this link, but still he somehow does not give the right output I desired because it has not st

  • SetDir problem

    I'm having a problem with SetDir as SetCurrentDirectory (windows API). If I use GetProjectDir to get the current directory of the project and add a lower case \\DAT\ it everything works fine (IE changes in path). The problem occurs when I try to chan

  • What is the recommended method for managing events mouseclick for nodes custom subclass components?

    HelloI created a custom node that is a StackPane containing a label on top a polygon. import javafx.scene.control.Label; import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; import javafx.scene.shape.Polygon; public class CustomHexa