Adding values in the primary column of ATG DB

Hello

Here is a fictitious scenario for my question:

Some of the tables oracle DB that are used in the profile repository:

Table T1 (NAME varchar2, varchar2 ADD) - old table
The table T2 (SNO varchar2 not null, NAME varchar2, varchar2 ADD) primary_key (SNO) - new table

I want to insert data from T1 to T2. This can be accomplished by using a SQL query in the comic book, but how can I insert values in the primary key column? I am aware that ATG may not treat the unique keys generated manually in SQL, it must generate its own primary keys using generators of ID.

How should I set the above scenario?

It is not true that ATG must reach all primary keys through his IDGenerator. The requirement is that no primary key, you also must be guaranteed to not collide with something that the IDGenerator could generate. If you look at sample CRS catalogue data, for example, you will see ID like masterCatalog and homeStoreCatalog. Those who never come out of the IDGenerator, which is what makes them safe.

The best way to keep your keys IDGenerator separated keys is to ensure that your keys have a different prefix or a suffix to the prefix or suffix configured for the point in idspaces.xml descriptor. For example, ATG has no prefix or a suffix for user profiles, so your key would be safe when they all began with one or two letters. For example, CRS sample nicks all start witih "be -". For references in the product catalog, configuration shipped to ATG defines "sku" to a prefix of ID. Examples of CRS data uses "xsku".

If you already have digital keys, you want to insert in the profile repository, the situation is more difficult, especially if you already have some profiles whose IDS are generated by the IDGenerator. If there is no collision yet, you may need to increase the value of 'seed' in the table of IDGenerator (das_id_generator), assigning a value that is greater than your higher key. You would probably do so that no ATG server running while they all pick up the new seeds when they started again. This process is risky and probably not worth a try if you're talking about a system that is already in production, especially if you are not an expert on the IDGenerator.

Tags: Oracle Applications

Similar Questions

  • How better to insert a subarray (line) in a 2D array to the correct index which is based on the value of the first column

    Hello

    I would like to insert a subarray (line) in a 2D to the correct index table. The position is to say the index value depends on the value of the first column of the table 2d.

    As an examlple my 2d array would look like this

    230 50 215 255

    300 60 270 330

    360 20 350 370

    And I would like to insert another line (subarray) with the following values

    320 40 300 340

    This new line should be placed between the second and third rows (this is based on the first column only).

    I tried the threshold 1 d function table by taking an 1Dsub array of my 2d array (first column), then using the first of the new line (320) as the threshold. It sort of work, but it does not work when I start the table (IE there is only 1 row) and it seems to not work properly on other occasions (as explained in the help of Labview).

    Hopefully the explanation is clear enough for any suggestion. Thanks in advance for the help!

    JTRI wrote:

    The idea is I have start with a new table and add these lines in the right order every time that the user sets the values Jack

    Ahh, so try this.

    This will also work with an empty array.

    You want to do with this function it is a Subvi.

    Make the entries 'table' and 'subarray"on the connector, then 'new array' output.

    You can then put this Subvi in a loop with a registry to shift and it will help to add new lines in a sorted order, when they are added.

    That is what you were aiming for?

  • Select literal values in the same column

    Hello
    like the practice:

    Select 'A', 'B', 'C' for double
    will select these values in their own column on the same line, is there a simple way to select these values in the same column on lines without first their insertion into a table?

    Thank you
    SQL> select 'A' x from dual union
      2  select 'B' x from dual union
      3  select 'C' x from dual ;
    
    X
    -
    A
    B
    C
    

    A bit complicated:

    SQL> select chr(ascii('A')+level-1) x
      2  from dual
      3  connect by level <=3;
    
    X
    -
    A
    B
    C
    

    Other:

    SQL> select regexp_substr('ABC','[[:alpha:]]',1,level) x
      2  from dual
      3  connect by level <= length('ABC');
    
    X
    ---
    A
    B
    C
    

    Max
    http://oracleitalia.WordPress.com

    Published by: Massimo Ruocchio, February 12, 2010 17:55
    added a second

    Published by: Massimo Ruocchio, February 12, 2010 17:58
    Added the third

  • Multiple values for the same column in the columns of diffétent in the same row?

    Hi all
    I wonder how you can display different values for the same column in different columns on the same line. For example, using a CASE statement, I can:

    CASE WHEN CODE IN ('1 ', ' 3') THEN COUNT (ID) AS 'Y '.
    CASE WHEN CODE NOT IN ('1 ', am') THEN COUNT (ID) AS "N".

    Yes, that will produce two columns but will produce null values to empty and also two separate registers.


    Any ideas?

    Thank you

    Are you sure that this code works for you?

    Select ID
             ,CASE WHEN MODE_CODE IN ('1', '3') THEN COUNT( No) END as "Fulltime"
             ,CASE WHEN MODE_CODE NOT IN ('1', '3') THEN COUNT( No ) END  as "Other"
    From table
    group by ID
    

    I guess the code above fails because MODE_CODE is not in your group by?

    My suggestion would be to put the CASE in the COUNT:

    Select ID
             ,COUNT(CASE WHEN MODE_CODE IN ('1', '3') THEN No END) as "Fulltime"
             ,COUNT(CASE WHEN MODE_CODE NOT IN ('1', '3') THEN No END)  as "Other"
    From table
    group by ID
    

    CASE expressions return no. when the respective conditions are true and NULL otherwise.
    COUNTY will have non-null values.

  • By the way the value of the report column in Javascript

    Dear magicians Apex,
    I am a bit stuck now to implement a modal pop-up/iframe/javascript and this forum is my last hope to solve this problem.
    Anyway, I will try to explain what I'm trying to accomplish.
    What I need, is: I want to have a SQL report, as first column I want to have an 'ID' of my table numbers and I want this column to have a "link in the column" located in the appropriate links "column attributes. The thing is that when I click on the link of the column (when I run my report on the Apex page) I need a JQuery modal window where the pop-up in IFrame will be another page and this page uses an 'ID' of my link URL column to display the data. So, basically, I want to pass a value of 'ID' of my page parent to my page of the child which appears in an iFrame modal window.
    And here's what I have:
    1. I have a SQL report:
     
    select SUBNET_ID, 
           long2ip(NETWORK_ADDRESS), 
           long2ip(SUBNET_MASK), 
           long2ip(END_HOST), 
           long2ip(START_HOST), 
           MAX_HOSTS, 
           long2ip(BROADCAST_IP), 
           NETWORK_CLASS, 
           NETWORK_SIZE, 
           HOST_SIZE 
    from   YC_CM_IP_SUBNETS 
    2 then, in 'The column attributes' to 'SUBNET_ID' a have put a "link in the column" URL like:
    javascript:ViewNetworkDetails(#SUBNET_ID#);
    3. now, when I run my page and point my mouse over any item in my column "SUBNET_ID", I see that she receives a number of "SUBNET_ID" of my table and it shows it in the button of the browser as:
    javascript:ViewNetworkDetails(1);
    , or (2) or anything that is 'SUBNET_ID '. So, that's good.
    4 and here I am confused, basically, I need to pass a value of
    javascript:ViewNetworkDetails(#SUBNET_ID#);
    , which seems to work as it gives me good numbers of my table to my 'ViewNetworkDetails' JavaScript function, then it can paste this value in "f?" p =... "IFrame URL. Here is my Jquery Modal script form and Javascript to redirect me to my popup page (the script is located in the HTML header):
     
    <script type="text/javascript"> 
    function ViewNetworkDetails(){ 
    var apexSession = $v('pInstance'); 
    var apexAppId = $v('pFlowId'); 
    var subnetIDNumber = document.getElementById(#SUBNET_ID#); 
    
    $(function(){ 
    vRuleBox = '<div id="ViewNetworkDetailsBox" title="View Subnet Details"> 
    <iframe src="f?p='+apexAppId+':103:'+apexSession+'::NO:103:P103_SUBNET_ID:'+subnetIDNumber+'
    "width="875" height="500" title="View Subnet Details" frameborder="no"></iframe></div>' 
    $(document.body).append(vRuleBox); 
    $("#ViewNetworkDetailsBox").dialog({ 
                            buttons:{"Cancel":function(){$(this).dialog("close");}}, 
                            stack: true, 
    modal: true,                             
                            width: 950,                     
    resizable: true, 
    autoResize: true, 
    draggable: true, 
    close : function(){$("#ViewNetworkDetailsBox").remove(); 
                            location.reload(true); } 
    }); 
    }); 
    } 
    </script> 
    PS My hypothesis is that there is a problem with this part of my script
    var subnetIDNumber = document.getElementById(#SUBNET_ID#); 
    where I can't get my "SUBNET_ID" value from
    javascript:ViewNetworkDetails(#SUBNET_ID#);
    in 'subnetIDNumber' variable and that's why I can't spend my iFrame URL.

    P.S. P.S. the child page 103 has a "Automated row fetch", is not a problem. In addition, I did a simple test, where I had a page element 'P102_Value' with values and in my script I had instead
    var subnetIDNumber = document.getElementById(#SUBNET_ID#); 
    This
    var subnetIDNumber = $v('P102_Value'); 
    and it worked perfectly fine... but cannot operate against the SQL Select statement :-(

    HEEEEEEEEEEEEEELLLLLPPPP.
    Thank you

    Change your column to link to send the value of the subnet_id column to the function call (you mentioned, but I don't know if you've actually done m)

    JavaScript:ViewNetworkDetails(#SUBNET_ID#);

    You pass the value of the parameter to the function, but not defined all the parameters in the function definition (this is possible in JS, no other parameter is ignored)
    For example, to change the function to accept the subnet ID parameter (I'm really surprised how you missed it) and assign this parameter to a variable.