How to get data in the procedure after CREATE TABLE table1 AS SELECT * from table2

Hello

can any body tell me how to get the data in the new table created in the procedure. because it gives following error.

  • Error (47,21): PL/SQL: ORA-00942: table or view does not exist

tableName: = "BCKUP_" | TO_CHAR (sysdate, 'ddmmrrrr');

tableDDL: = 'CREATE TABLE' | tableName. "AS SELECT * FROM Table1 where to_char(MSG_IN_TIME,''dd-mon-rrrr'') < sysdate - ' | daysNumber;

EXECUTE IMMEDIATE backUpDDL;

COMMIT;

DELETE FROM Table1;

How to select the data in the newly created table. as...

Select * from ". tableName;

Do not choose anything to get the number...

Just after backupDDL EXECUTE IMMEDIATE, simply refers to SQL % ROWCOUNT - who will be the number of lines.

Oh and DDL engages automatically, your commitment is redundant.

Tags: Database

Similar Questions

  • Do not get data in the target after the beginning of the session.

    Hello

    I applied the filter. source and target table are Oracle database tables. Source have data. Target of no data. I chose insert, update, commit as true in the properties of the target. Eventhough

    After the execution, I do not receive data in the tables of the target. Please check below the images.

    Thanks in advance,

    A.Kavya.

    err1.png

    192.168.0.png

    err2.png

    Hello

    Screen capture, I see you used LKM as well. Then, probably, you can start by consulting the table loading step $ CAN to see how many rows were loaded into C$ source table.

    If you have data in C$ then next step would be to check the data loaded in I$ table. I can see screenshots that you set the false Frother so that your data can not go to E$. PS please check where your data falls to C$ I $ loading.

    You can restart the interface and you can set the property 'drop of temporary objects' false so that C$ I $ table not deleted and are there for analysis.

    It will be useful.

    Thank you

    Ajay

  • How to get fullname of the user after login

    Hello.

    I'm developing a simple web panel with the vCloud API readonly information.

    I was able to get information about organizations, vApps, TDC and VMs, but something "simple" that to get the full name of the user logged in using the login process API vCloud is impossible for me.

    Please, can someone give me help on this?

    I use vCloud API SDK for PHP, but I'd appreciate any kind of information or instructions on how to get connected fullname of the user.

    Thanks in advance for you help.

    In order to be able to do this you will first need to connect to the organization with the user "administrator of the Organization" and record the information about users somewhere - in a database, or some kind of in-memory cache. You can't get much information on a normal user to user.

    Users to get information, to get the 'admin' of an organization representation.

    GET https://> /api/v1.0/admin/org/>

    When you make the request in the response above, you will find a section

    After that, you do a GET request for each user and read the information. Save it somewhere and use it later.

    GET >

  • Plan the work that runs according to max date in the source to create table

    Hi all

    I am trying to create an automation in my sql. Basically, I have a table I do reporting and analysis on which is a subset of records from a source table. For the purposes of this example, I called the source table "src_table" and my table as the target table, "tgt_table." Essentially the source table gets updated with a value again months from date (founded order_dt) and I have a procedure I call when the source table is updated to load the value of the new month of records in my target table. So let say June 2012 data is loaded in the source table, I call my procedure that has a date parameter and enter June 2012 as the point of departure date so that it looks for new records in the source table from June 1, 2012 and load it into my target table. For variety reasons I won't get in, my goal in a position is not a view, there must be a stand alone table. The problem is that the source never table gets updated at the same speed interval... sometimes they will load a new months of data at the beginning of the following month, sometimes medium of the month... sometimes I have to wait a few months to get another month of data. So, whenever I get a email notification telling me another month of data is loaded in the source table, I have a windows batch file that runs my setting... I just have to change the start date (based on the order_dt column) and run it. I want to do is automate the process so that I did not yet do. What do I think creates a task that runs every day or even at the end of each month, this work has basically seized the date of maximum order of the source table and if the date of the order is greater than the maximum order date in my target table, it runs my procedure that loads the new month with a value of data in my target table. Thus, for example, my maximum order of my target table date is May 31, 2012. The work runs at a certain period of time and check the maximum date on the source table, if the maximum date is May 31 nothing happens... new data has not been loaded so does not perform the procedure. If the maximum date on the source table is June 30, 2012, the maximum date is greater than the maximum in my table target date so that the procedure runs. I need also the procedure to insert records into the table in the source where the order date in the source table is > = at the time of maximum order in the target table.

    In a Word, this is what I need but I'm not sure how to put in place. The procedure works fine... all I need is an interim procedure that runs as a scheduled task every x number of days and the date of maximum order check on the source table if it exceeds the maximum order on my table of target date it runs my procedure. My procedure is called "insert_new_orders" and when I run it I run it like:

    execute insert_new_orders('01-jun-2012');

    If anyone can help me with what would be great :-)

    Thank you
    Ed

    To start:
    You must remove the EXECUTE keyword.

  • NULL point Exception: when we try to insert data with the procedure after obtaining values of the iterator.

    public String submit() {}

    BindingContext bindingContext = BindingContext.getCurrent ();

    DC DCDataControl = bindingContext.findDataControl("AppModuleDataControl");

    AppM AppModuleImpl = (AppModuleImpl) dc.getDataProvider ();

    BindingContainer links = getBindings();

    OperationBinding operationBinding = bindings.getOperationBinding("getCAL");

    Object result = operationBinding.execute ();

    String dte = result.toString ();

    Model CollectionModel = (CollectionModel) classHeldTbl.getValue ();

    ROWCOUNT int = model.getRowCount ();

    for (int i = 0; i < rowcount; i ++) {}

    JUCtrlHierNodeBinding = (JUCtrlHierNodeBinding) model.getRowData (i) rowData;

    If (rowData.getAttribute (8)! = null) {}

    int slotId = Integer.parseInt (rowData.getAttribute (5) m:System.NET.SocketAddress.ToString ());

    int sectionId = Integer.parseInt (rowData.getAttribute (6) m:System.NET.SocketAddress.ToString ());

    int teacherId = Integer.parseInt (rowData.getAttribute (7) m:System.NET.SocketAddress.ToString ());

    String rowData.getAttribute = chk (8) m:System.NET.SocketAddress.ToString ();

    If (chk.equals ("true")) {}

    try {}

    System.out.println ("dateee:" + result + "id Teachr" + teacherId + ETD + "" + slotId + "" + sectionId);

    appM.submitClassHeld (teacherId, dte, IDEmplacement, sectionId);

    System.out.println ("After proc");

    } catch (NullPointerException e) {}

    System.out.println ("-Execption" + e.getMessage ());

    }

    }

    }

    }

    Returns a null value.

    }

    There are no issues with values... This function works only once. When we submit the values on the selection box it works once, but when press us the button submit again select different box it inserts the value in the database, but on the page shows null pointer exception.

    RowData are so is equal to null.

    Change this line in the following way:

    System.out.println ("rowData =" + rowData);

    If (rowData! = null & rowData.getAttribute (8)! = null)

    and lat me know what happens

    JohnMackanzi wrote:

    Number of line 58

    If (rowData.getAttribute (8)! = null) {}

  • How do you use 'Connect the tracks' after 'Create vector layer forms' on one layer only shots?

    Hello

    Adobe After Effects CC

    2014.0.2

    Version 13.0.2.3

    I imported an illustrator file that was created in Illustrator CC 18.0.0. The file contains the outline of a logo. This is the logo with the filling, set to none and the race set to 1px.

    I drag the file logo_strokes.ai to the composition, right-click and click on create vector shapes.

    A new layer is created and the content 'drop-down', a fill layer 1 is created.

    When I select "drop-down" content and click Add / trim paths, a layer of trim paths 1 is created.

    When I animate the Trim paths 1, it seems to animate the fill layer, not the race.

    How I managed to animate only the line and shows quite a filling?

    Thank you.

    stokes.png

    fill.png

    I have it.

    In illustrator, set align STROKE to the Center on each track you want to cut.

    He was aligned inside, which was the creation of the filling inside of After Effects.

    Thank you.

  • How can I get my first step of the procedure in a table having the space above?

    I work with FM11. I have a few steps in the procedure in a table and the first line is too close to the header row. I tried to add the workspace with the paragraph Designer, but there seems not to be the first drop step procedure below. How can I make this work? Thanks for your help.

    > I tried to add the workspace with the paragraph Designer...

    How?
    Paragraph Designer: base: space: above Pgf probably won't work, because it's usually not when you're a high column para.

    Paragraph Designer: table cell: cell margins should work, but will affect all lines, except if you use a single paragraph for only first tag rows.

    Table Designer: base: default cell margins should also work, but will also affect all lines.

    Way of hackers: insert a small empty anchored frame at-insertion point to push against the separator.

  • call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. The other rows are based on the entities

    Hi Experts,

    JDeveloper 12.1.3.0.0

    I have a VO based on entity object. With a column of the VO is transient attribute (I created).

    I need to call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. As well as other attributes.

    So can anyone suggest how can I achieve this?

    Thank you

    AR

    I think that you need a stored function (which returns the value) in this case, is not?

    Take a look at:

    https://docs.Oracle.com/CD/B31017_01/Web.1013/b25947/bcadvgen005.htm

    and search for:

    Invoking stored function with only Arguments in

    call your function in the Get attribute and return value accessor...

  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • How to get information about the types within a user defined package

    Hi all
    Have a package with some types (user-defined) defined in the package specification. How to get information about the types and
    information about the columns of this type.

    for example:
    Create package mp is

    type t is record (no number is varchar2 (30));

    procedure a (m t out...

    Thanks in advance.

    userg

    G_user wrote:
    the req's, want to build a script dynamically using data dictionary
    so if possible, I take the name of the type within the package specification.

    Let me rephrase - is there a data dictionary to get information on the type defined by the user within a package specification

    Best approach will be to have a standard in the definition of data types.

    Have a process to follow the object definitions in the package if it is mandatory.

  • I can't use Roboform with 4.0 beta 10, so I can't use Firefox. How to get back to the beta version 9?

    I can't use Roboform with 4.0 beta 10, so I can't use Firefox. How to get back to the beta version 9?

    I think that there is a little more for it, but here's a solution that seems to work. After the installation of Roboform 7.1.7, go to: http://www.roboform.com/platforms/browsers/firefox and scroll down to a table listing the three browsers identifying the XPI file to load if it was not loaded automatically. Click the http://www.roboform.com/dist/roboform-firefox-3-4-frozen.xpilink. Firefox will ask you if you want to allow this should be installed. Let him. Finish installation, restart Firefox 4.0b10, and you'll see a Roboform 7.1.7 toolbar works. I did it on two computers, and everything seems to work.

  • How to get rid of the space up and down in menu bootstrap reduced

    Hi, anyone knows how to get rid of the top and bottom extra space on a menu reduced "bootstrap"?  I'm on bootstrap more a custom style sheet just for the menu reduced so I can have the background color instead of a repeat of the default image.  Here is a picture of the problem (marked in red) below is my code.  Thank you very much.

    Zaid

    bootstrap_menu.jpg

    < nav class = "navbar, navbar-default" >

    < div class = "container-fluid" >

    <!-brand and toggle get grouped together for better mobile display->

    < div class = "bar navigation-header" >

    < button type = "button" class = "toggle navigation bar has collapsed" data-toggle = 'collapse' data-target = "#defaultNavbar1" >

    < span class = "sr only" > toggle navigation </span >

    < span class = 'bar icons' > < / span >

    < span class = 'bar icons' > < / span >

    < span class = 'bar icons' > < / span >

    < / button >

    < a class = 'bar of navigation-brand' href = "index.html" > < /a > brand

    < / div >

    <!-collect the nav links, forms, and other content to alternate->

    < div class = "navbar-collapse custom class collapse" id = "defaultNavbar1" >

    < ul class = "navbar-nav, navbar-right nav" >

    < li > < a href = "Music.html" > music < /a > < /li > ""

    < li > < a href = "Images.html" > pictures < /a > < /li > ""

    < li > < a href = "Unity3D.html" > Unity3D < /a > < /li > ""

    < li > < a href = "Flash.html" > Flash < /a > < /li > ""

    < li > < a href = "About.html" > on < /a > < /li >

    < /ul >

    < / div >

    <!-/ .navbar-collapse->

    < / div >

    <!-/ .container-fluid->

    < / nav >

    @media (max-width: 768px) {}

    {.custom-class

    Overflow-x: visible;

    -webkit-too-full-scrolling: touch;

    background-color: #7399E4;

    background-image: none;

    height: auto;

    border-width: 0px;

    }

    . NAV > li {}

    display: block;

    position: relative;

    border: 1px solid #2763CC;

    }

    }

    .Navbar-nav in Bootstrap class has upper and lower margin 7.5px. You must remove it.

  • Question: How to make data Disqualification Purge project after completing a work?

    Hi all

    I know how manually purge the data of the project by clicking on

    but I wonder if there is a way to Purge project data of the Disqualification after completing a work in itself.

    Thanks in advance for any response.

    Note that Disqualification 11 g, just released, includes the ability to create policy rules for the purge of the data where the jobs are executed with labels of execution.

    This does not include the data produced during the execution of the works interactively to the Director (i.e. development and test jobs).

  • How to compile packge inside the procedure that uses this package

    ORACLE 10g, 11g

    CREATE OR REPLACE PACKAGE PKG_TEST_COMMIT
    PROCEDURE Insert_into_table_T1;
    PROCEDURE Update_table_T1;
    END PKG_TEST_COMMIT;

    CREATE OR REPLACE PROCEDURE PROC_TEST_COMMIT as
    Begin
    PKG_TEST_COMMIT. Insert_into_table_T1; -Insert data into table T1
    EXECUTE IMMEDIATE 'DROP table T1;
    IMMEDIATE EXECUTION
    "create table T1 as select"1 ","d"," s "from DUAL;" -now PKG_TEST_COMMIT package at the stage not compiled
    -compile the package
    DBMS_DDL.alter_compile ('PACKAGE', 'OWNER', "PKG_TEST_COMMIT");
    PKG_TEST_COMMIT. Update_into_table_T1;
    End PROC_TEST_COMMIT;

    When I try to run the PKG_TEST_COMMIT I get an error: cannot lock the package.
    I tried to create a separate procedure for compiling, but the result is the same.
    If I'm done PROC_TEST_COMMIT before compiling, then compile - OK.

    It's a way to compile the package inside the procedure?

    TRUNCATE and INSERT / * + APPEND * / should be more effective than deleting them and recreating a table wouldn't it because you don't have to worry about the invalidation and recompilation of all dependent objects.

    Justin

  • How to get rid of the stupid list dropdown in the search box

    How to get rid of the stupid list dropdown in the search box

    If you want to restore the window previously used independently to manage search engines, you can enable or disable this pref to false with a middle-click on the topic: config page.

    • topic: config page: browser.search.showOneOffButtons = false

    Close and restart Firefox to force change.

Maybe you are looking for

  • Why is my iPhone does not give me the ability to upgrade to iOS 10?

    I backed up my iPhone 6 s, and when I go in settings-general-Software Update, it says my software is up to date with iOS 9.3.5... Why my phone doesn't give me the option to update the iOS new 10? I have even tried to connect my phone to my Macbook an

  • My windows pc

    My windows pc has an 0xc0000034 error and I did not now what it takes can someone help me

  • Alpha Antivirus help

    I went into safe mode to download the program, but my mouse does not work. How to navigate mode safe?

  • Attempt to upgrade post to restoreBackupPiece

    HelloI recently updated my software database for Oracle 12 c, it clean without bodies or database on the subject.The machine is Windows Server R2 2012.When I try to run the script (after the upgrade), I get the following error:Script: WHENEVER SQLERR

  • Post in the deployment of buses of Service projects using maven

    HelloI'm using the following documentation to deploy bus service to my server OSB projects.http://docs.Oracle.com/middleware/1213/core/Maven/osb_maven_project.htm#MAVEN8973I was also able to see the sbar .data/Maven each project directory files and a