Nsert/Update and Add Column at the same Table and at the "same" Time

Hello,
I want Insert/Update and Add Column at the same Table and at the "same" Time but in different sessions.
Example:
At first the "insert/update" statement:
Insert into TestTable (Testid,Value) values (1,5105);
After that the "add" statement:
Alter table TestTable add TestColumn number;
- sadly now I get the message: ORA-00054: resource busy and acquire with NOWAIT specified
"insert/update" statement:
Insert into TestTable (Testid,Value) values (2,1135);
After that the execute commit.
I don't know when the first session set the commit statement so I want that the DB the "Alter Table..." statement execute if it's possible.
If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.
Thanks for ideas

Well I want to walk in the rain without and umbrella and still stay dry, but it ain't gonna happen.
You can't run a DDL statement against a table with transactions pending. Session 2 has to wait until session commits or rollbacks (or until the session is killed). That's just the way it is.
This makes sense if you think about it. The data dictionary has to be consistent across all sessions. If session 2 was allowed to change the table structure whilst session 1 has a pending transaction then the database is in an inconsistent state. This is easier to see if you consider the reverse situation - the ALTER TABLE statement run by session 2 does a DROP COLUMN TESTID rather than adding a column: now what should happen to session 1's INSERT statement? You have retrospectively invalidated a statement that was perfectly legal when it was executed.
If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.Fnord.
Cheers, APC

Similar Messages

  • Hello guys..!! I have got my new  iphone 4 2 days ago.The same day it got a problem of auto restart in every 1, to 2 minutes. I updated and restored it many times...but of no use... can any one help me how to solve this problem..!!

    Hello guys..!! I have got my new  iphone 4 2 days ago.The same day it got a problem of auto restart in every 1, to 2 minutes. I updated and restored it many times...but of no use... can any one help me how to solve this problem..!!

    Go to Settings/General/Reset - Erase all content and settings. the connecto to iTunes and restore as a New phone. Do not restore any backup. If the problem persists you have a hardware problem. Take it to Apple for exchange.
    This assumes that the phone is not hacked or jailbroken. If it is you will have to go elsewhere on the internet for help.

  • Derived table 'tablename' is not updatable because a column of the derived table is derived or constant.

    Hi Guys,
    I have a With CTE table expression ,this cte gets the value from startdate and enddate
    I need to insert this startdate and enddate into a table ,while inserting into table,i got the below error,
    Derived table 'Datematrix' is not updatable because a column of the derived table is derived or constant.
    below is the query i used,
    declare @StartDate date='01/01/2013'
    declare @EndDate date='12/31/2013'
    ;WITH Datematrix(AllocationDate)
    As
    SELECT @StartDate AS AllocationDate
    UNION ALL
    SELECT DATEADD(D,1,AllocationDate) AS AllocationDate
    FROM Datematrix WHERE AllocationDate<@EndDate
    Insert into Datematrix(AllocationDate)
    select * from Datematrix 
    any guys update this solution.
    Thanks 
    Bhupesh.R

    ;WITH Datematrix(AllocationDate)
    As
    SELECT @StartDate AS AllocationDate
    UNION ALL
    SELECT DATEADD(D,1,AllocationDate) AS AllocationDate
    FROM Datematrix WHERE AllocationDate<@EndDate
    Insert into Datematrix(AllocationDate)
    select * from Datematrix 
    Hello,
    Your CTE bases only on fix value = @StartDate , not on a table/view; here do you want to insert data to? This don't work in any way.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • I have updated my iPhone 4 for the first time in about a year. I had synced it so my photos should be safe but it's now telling me I have to restore. I'm worried I will lose my messages and whatsapp videos as I have a pc so these aren't saved elsewhere

    I have updated my iPhone 4 for the first time in about a year. I had synced it so my photos should be safe but it's now telling me I have to restore. I'm worried I will lose my messages and whatsapp videos as I have a pc so these aren't saved elsewhere

    Restore from backup and everything will be exactly as it was when the backup was created.
    Restore as new and the device will be as if it just came out of the box.

  • Phap_admin: how to add columns to the initial ALV

    Hello everyone,
    I have a requirement which is to add 2 new columns on the ALV that appears after going through the phap_admin selection screen.
    I show you a picture as an example:
    I need to add 2 fields form infotype 0002 in this ALV list.
    I've been looking around and I found this badi: HRHAP00_REPORTING, but I don't think it can help me, because this bady Works after clicking the status button "Reporting" at /nphap_search.
    Does anybody faced the same issue?
    Do you now any badi for that purpose?
    Help would be apreciated and rewarded with points.
    Kind regards.

    Append your additional fields in this structure HAP_S_DOCUMENTS  it will show in the layout.
    then write implicit enhancement for data population where final itab is filling.
    and  after append structure,   for data population in the following include LHRHAP_UI_DOCUMENT_REPORTF06 and subroutine f1100_ctrl_create   modify table based on ur logic.
    I tried in my sandbox its working fine and data  is showing perfectly.
    suri

  • Add columns in the existing Customer table in a Subject Area

    Hi All,
    Well I need to add two columns from Sales table(new table i created which has customer Id) and join it to the Customer Table which has the Customer Id and several columns. The Customer table was already in the RPD which has all the customer information. Now that i have this new requirement to add few columns from the Sales table to the Customer table in one Subject Area.
    What i have done so far is that I imported the sales table into the rpd, made a join in PHYSICAL LAYER on the customer ID of the Sales table to the Customer id of the Customer table and simply dragged the sales table to the Customer LTS in the BMM layer(NO MORE JOINS IN BMM)and dragged and dropped the same into the Presentation layer. The customer table is linked to one fact table in that subject area. So i thought that dragging the sales table columns in the customer table LTS will work because customer is linked to one fact in that subject area.
    Now, In the Answers when I dragged columns from customer & sales table I see only one record that is the first customer_id record from my Sales table but i know there are many common customer_ids between those two tables but its only picking the first customer id from the sales table.
    Any help will be appreciated..
    Normally if we need to add some columns to the existing tables in one subject area what is the best approach??

    Hi Balajee,
    SAPMM06E 0111 CUSTSCR1 SAPLXM06 0111 Subscreen: PO item
    for more information check with these links
    ADDING NEW FIELDS IN me21n
    ADDING NEW FIELDS IN me21n - (Screen exit / enhancment)
    hope this will useful to you.
    Regards!

  • How can I update a Site Column with the content of an array with javascript CSOM?

    I'm relative new to Sharepoint 2013, I'm trying to update the content of a Site column with the content of an array, I can retrieve and visualize the content of my site column, the user is able to change and save the necessary part and the changes are
    saved into an array, now I have to update the content of the site column with the content of the array, but for some kind of reasons I can't accomplish that, any suggestion/example? This is my code so far to retrieve, visualize the site column and store the
    mofication into my array.
        <body>
                <select id="dropdown" name="dropdown" onchange="optSelect()">
                    <option value="EngineType_Cylinders">EngineType_Cylinders</option>
                    <option value="EngineType_EngineCycle">EngineType_EngineCycle</option>
                    <option value="EngineType_EngineFamily">EngineType_EngineFamily</option>
                    <option value="EngineType_Euro">EngineType_Euro</option>
                    <option value="EngineType_FamilyEvolution">EngineType_FamilyEvolution</option>
                    <option value="EngineType_GasEmissionLevel">EngineType_GasEmissionLevel</option>
                    <option value="EngineType_Power">EngineType_Power</option>
                    <option value="EngineType_PowerSupply">EngineType_PowerSupply</option>
                    <option value="EngineType_Use">EngineType_Use</option>
                </select><br />
                <textarea id="textareadisplay" rows="25" cols="23"></textarea><br />
                <input type ="button" value="Update values" onclick="addItemsToColumns()" />
            </body>
    My Javascript
        $(function () {
            SP.SOD.executeOrDelayUntilScriptLoaded(Function.createDelegate(this, function () {
               var select = document.getElementById('dropdown').value;
                console.log(select);
                getSiteColumns(select);
            }), 'SP.js');
        var fieldChoice;
        var choices;
        var addFields = [];
        var slc;
        var clientContext;
        function optSelect() {
            slc = document.getElementById('dropdown').value;
            getSiteColumns(slc);
        function getSiteColumns(selection) {
           clientContext = SP.ClientContext.get_current();
            if (clientContext != undefined && clientContext != null) {
                var web = clientContext.get_web();
                fieldChoice = clientContext.castTo(web.get_availableFields().getByTitle(selection), SP.FieldChoice);
                clientContext.load(this.fieldChoice);
                clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
        function OnLoadSuccess(sender, args) {
            choices = fieldChoice.get_choices();
            var textarea = document.getElementById("textareadisplay");
            textarea.value = choices.join("\n");
        function OnLoadFailed(sender, args) {
            alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
        function addItemsToColumns() {
            clientC = SP.ClientContext.get_current();
            var arrayForUpdate = $('#textareadisplay').val().split('\n');
            fieldChoice.set_item(, arrayForUpdate);
            fieldChoice.update();
            clientContext.executeQueryAsync(function () { }, function () { });
        function OnUpdateSuccess(sender, args) {
            var newchoices = fieldChoice.get_choices();
    My problem is on the function addItemsToColumns() please help! Thanks in advance.

    Let's look at your stylesheet -
    <style type="text/css">
    body {
    background-image: url(assets/images/Business%20Men%20In%20Reception%20Col.2.jpg);
    background-repeat: no-repeat;
    background-color: #003;
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width: 960px;
    It's a good idea not to use spaces or any punctuation in your filenames when working for the web.
    #header {
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width: 960px;
    #heading {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 36px;
    font-style: italic;
    font-variant: normal;
    margin-left:auto;
    margin-right:auto;
    There's no need to specify the default values (font-variant:normal) or to specify auto margins for any block element without an explicitly defined width. And wouldn't it make more sense to put the font style on the body tag, where it will inherit into the rest of the page than to restate it as you have done in the next rule?
    #bodytext {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 18px;
    line-height: 25px;
    font-variant: normal;
    width: 300px;
    #container {
    width: 960px;
    position: relative;
    margin-left:auto;
    margin-right:auto;
    .rightimg {
    float: right;
    margin-left: auto;
    padding-right: 40px;
    #heading #navbar ul li {
    padding: 30px;
    </style>
    Margin-left:auto can't work without knowing what the width of the element is....  Keep your CSS lean and targeted - it will help you to debug your layouts.

  • Add column in the dynamic internal table

    Hi Experts,
    I have a dynamic internal table. I need add new column in the internal table and I don´t Know.
    My code:
    DATA:  it_generic TYPE REF TO Data,
    wa_generic TYPE REF TO data.
    FIELD-SYMBOLS: <table> TYPE ANY TABLE,
    <wa>    TYPE ANY,
    <field> TYPE ANY.
    CREATE DATA it_generic  TYPE STANDARD TABLE OF (wa_datoscarga-ZTBLCAR).
    CREATE DATA wa_generic  TYPE (wa_datoscarga-ZTBLCAR).
    ASSIGN it_generic->* TO <table>.
    CHECK <table> IS ASSIGNED.
    ASSIGN wa_generic->* TO <wa>.
    CHECK <wa> IS ASSIGNED.
    SELECT *
    INTO  CORRESPONDING FIELDS OF TABLE <table>
    FROM (wa_datoscarga-ZTBLCAR)
    WHERE  bukrs   EQ p_bukrs      AND
    z_petic EQ z_peticion   AND
    ZIDFASE eq 'E'.
    After this I need add one column selection at the first position of the columns.
    Thanks

    Hi,
    Please refer to the below link for the code snippet on how to create a dynamic internal table -
    [Create a dynamic internal table.|http://www.divulgesap.com/blog.php?p=MjE=]
    Cheers,
    Ravi

  • How to add columns in the Group Custom Columns

    Hi,
    In a group, if you select Edit Group link, and select the Columns tab, and then select the "Modify" button, then select a target type from the drop down, you can pick listed columns and move it to the Selected Columns list. I am interested in adding a column in the drop down list, how do I do that? If the target type is a plug-in that I created, then what properties I should set in the metadata xml file?
    Thanks for the help.

    As far as I am aware, there are no properties in your plugin's target type metadata XML file that relate to what columns show up in the Groups UI in the EM console. I suggest pursuing this as a bug against the Groups UI.

  • Download the Update and run locally multiple times.

    Is it possible to get the (October 2gb update) bits locally from a machine instead of downloading on every machine i have with Win10? I see various folders, but not sure what would work. 2.5gig at a shot is a chunk.
    Thanks, Jon
    Jon

    Hi HupSkiDup (Jon),
    I was thinking a way to create a ISO file so that we can use this file to perform upgrade, but the method would be a bit of complicated.
    Here is my thought and steps.
    First, if we update our Windows 10 Technical Preview for Enterprise to 9860 build, we would get a install.esd file under C:\RecoveryImage folder.
    In Windows 8.1, here is a tool called update advisor, which would covert the esd file to ISO file, but in Windows 10 Technical Preview, there is no such thing. So my thought is to use the install.esd
    to create an install.wim or bootable ISO file.
    In my first thought, I want to sysprep an updated OS, but it failed without doubt, because we cannot sysprep a updated version OS. So, I choose to use Reset option. Install.esd would be recognized
    a compressed install.wim. when I use reset option in 9860 build, it reset the current OS, and I can sysprep this system now. After that, I was trying to use install.esd file directly in 9841 build:
    I copy the install.esd to a 9841 build OS, for example, I copy it to C:\RecoveryImage, and run
    reagentc.exe /setosimage /path C:\RecoveryImage /target c:Windows /Index 1 , it cannot reset the Windows OS. So I have to create an install.wim file for deployment.
    I use Reset option in 9860 build OS, when it is finished, run sysprep, it ran well, I can capture 9860 build wim file (WDS server capture or dism command). We rename it as install.wim.
    Use the captured install.wim to set recovery image in 9841 build (copy install.wim to C:\RecoveryImage, and run
    reagentc.exe /setosimage /path C:\RecoveryImage /target c:Windows /Index 1), 9841 build succeed upgrading to 9860 build via Reset and Refresh options.
    Refresh would upgrade without losing setting and data.
    Alex Zhao
    TechNet Community Support

  • Add Column to MIGO Item Table

    All:
    I have searched SDN unsuccessfully to find a mechanism to add a Z field to the MIGO Item Table.  I know you can add customer sub-screens to either the header section or the item details section.  However, I have been unable to find out how to add a column to the item table in MIGO.
    I can use an append structure to add the field to GOITEM and GOITEM_TV and that works fine.  However, this new Z field is not appearing on the screen.  The field value itself is not transferred to the application in internal table TV_GOITEM.  MB_MIGO_BADI does not appear to have a Method that makes this type of change possible.
    Is there another BADI or userexit available to do this?
    Thanks!

    Hi,
       I think that is not possible but you as you already know why dont you add a new tab to the items data and add the fields there.
    Regards,
    Himanshu

  • After Add Instance occurs the date/time field data is removed.

    I have multiple dropdown options that adds or deletes a row from a table.  Trouble is after I have placed a date or time in fields elsewhere on the form, that data is deleted after I make a selection on the dropdown.  The dropdown has the options of In, Out, N/A, or N/O and when Out is selected the AddInstance is invoked adding a row to the table and when any of the others are selected the RemoveInstance removes the row.  This part works fine but the values in the date and time fields are removed as a result of the selection.  I have multiple dropdowns, and the code below will keep my data in the fields on the first selection but on subsequent selections the data for the data/time fileds are removed.  Any recommendataions on what is going on and how I can stop this?
    My codes appear below.
      if (this.rawValue == 1)  // If the value selected is "Out" of compliance then ...
         School.ItemListPage.ObsRec._Rows.insertInstance(0);  // Add an item to the table
         xfa.form.recalculate(false);
      else  // If the value selected is "In", "N/A", or "N/O" then ...
         School.ItemListPage.ObsRec._Rows.removeInstance(0);  // Remove this item from the table
      endif

    Hi,
    TRUNC( ) Function retrieves date part of DATE (date and time) datatype.
    Regards,
    Sailaja

  • WWV-01821 when trying to add column to a database table

    I have a database table with 5 columns, all NUMBER. When I try to add a column via the Portal Navigator, I get the error:
    Error:      Exception from wwv_generate_component.build_procedure (WWV-01821)
    I can add the column via SQLPlus with alter table. Any ideas?
    TIA

    No help there. The WWV-01821 error is not even in the documentation.
    <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="60%" ALIGN="CENTER">
    <TR>
    <TD><FONT CLASS="OraErrorHeader">Error:</FONT></TD>
    <TD ALIGN="LEFT"><FONT CLASS="OraErrorText">Exception from wwv_generate_component.build_procedure<NOBR> (WWV-01821)</NOBR><BR><!-- wwv_builder.finish --></FONT></TD>
    </TR>
    </TABLE>
    Edited by: Angrydot on Mar 30, 2009 11:30 AM

  • Firefox was fine until the last update, now it crashes all the damn time

    It never crashed until the update to 9.1, now it just crashes all the time, various sites, just stops no warning, nothing.

    These links are of no help whatsoever, Firefox updated itself to 9.1. I have not added any software, hardware or changed a thing since before the update. It only started crashing unexpectedly after the update. Therefore, logic would conclude there's a glitch in the update wouldn't it? I have downloaded and reinstalled it twice since the update and the crashing began. The last time I did this was yesterday, so far so good..I'm keeping my fingers crossed.

  • Can I add columns to the new iTunes 11 simple view?

    More details in this picture:
    (http://www.qpic.ws/images/playounitunes.png)

    That looks like the Albums view, and it does not have columns to add.
    If you want to choose columns such as Rating, switch to Songs view.  Then go into View > View Options and make your choices.

Maybe you are looking for

  • Podcasts no longer downloading overseas

    I am writing with a question about iTunes use in Turkey. I am an American living abroad in Turkey and before December 2010 was downloading several US-based podcasts via iTunes to listen to on my iPod touch. Since December, however, many of the podcas

  • How do I get back My Yahoo page in windows format. It suddenly switched to App. Andhate it

    My My Yahoo homepage suddenly switched from windows format to App. I hate it how do I get back the old format? Peggy

  • Financial statement - FSE3

    Hello! We have customer specified Financial statements. The statements exist in old SAP environment 4.6C. Statements are needed in new SAP environment 6.0 ECC. Does someone know if Financial statements can be transported from the one SAP system to an

  • Sending mail by alert management

    Dear All, I've scenario as below In one of our customer ,MD(Director of Company) wants Purchase Order and Sales Order Details daily by e-mail I've successfully configured email setting and I am Able to send e mail (Externally) I've created the simple

  • Is there any way to write to a socket after shutting it down?

    Guys is there any way to write to a socket after using the shutdownOutput() method? I get this complain at runtime java.net.SocketException: Cannot send after socket shutdown: socket write error