Dealing with errors due to newly added/removed columns

DB version: 11 g


I don't know if I created a post unnecessarily large to explain a simple problem. Anway, this is here.

Asked me to encode a package for archiving.

We will have two schemas; The original schema and a schema of the Archive (connected via a DB link)
ORIGINAL Schema -------------------------> ARCHIVE Schema
               via DB Link
When the records of some tables in the ORIGINAL schema meet the archiving criteria (based on the number of days old, Status Code etc.), it will be moved ("archived") to the schema of the ARCHIVE using the INSERT syntax
insert into arch_original@dblink
(
col1,
col2,
col3,
.
.
.
.
)
select col1,
col2,
col3,
.
.
.
.
from original_table
The original table and the table of archive has the same structure, except that the Archive table has an additional column called archived_date that records only when a record got archived.
create table original
(
col1 varchar2(33),
col2 varchar2(35),
empid number
);


create table arch_original
(
col1 varchar2(33),
col2 varchar2(35),
empid number,
archived_date date default sysdate not null
);
We have tables with many columns (there are a lot of tables with more than 100 columns), and when all column names are explicitly mentioned as the above syntax, the code becomes huge.

Alternative syntax:

So I thougt of using the syntax
insert into arch_original select original.*,sysdate from original;  -- sysdate will populate archived_date column
Even if the code looks simple and short, I noticed a downside to this approach.

Disadvantage:
For the next version, if developers decide to add/drag a column in the ORIGINAL table in the original schema, this change should be apparent in (ARCHIVE) DDL script of the diagram of the archive_table as well. It is virtually impossible to keep track of all these changes during the development phase.


If I use
insert into arch_original select original.*,sysdate from original;  
syntax, you will realize that there is change in the structure of the table only when you encounter an error (because of lack/news column) in the Runtime. But, if you have all the column names are explicitly as
insert into arch_original@dblink
(col1,
col2,
col3,
.
.
.
.
)
select col1,
col2,
col3,
.
.
.
.
from original_table
Next, you will encounter this error when compiling itself. I prefer the error due to a lack/new column when compiling itself rather than at run time.

While the guys do you think? I shouldn't go to
insert into arch_original select original.*,sysdate from original; 
syntax due to the inconvenience above. Right?

VitaminD salvation,

Yes, something like that. Only, I meant to use it as a code generator to produce static sql to use in your archiver plan. I didn't use dynamic sql.

Start with something simple, to generate lists of columns to insert and select. Decide if you want to generate complete instructions, procedures or the same package.

For beginners to do something like you suggest

select ',' || column_name from cols where table_name like :your_table order by column_id;

Out of use allows you to easily create your insert into... Select in the statement. Once you feel able to this topic, consider as much as your taste.

But my point is still. Use it as a static sql.

Concerning
Peter

Tags: Database

Similar Questions

  • 100 requests to continue POST deal with error in Firefox 24

    BUG Firefox 24!
    24 Firefox manages POST requests with the error: when 100 continue answers are preceded by 200 OK response, and then Firefox does not deal with other responses (including 200 OK response) after receipt of the response to continue first 100.
    Earlier versions more handle 100 continue properly.

    I'm sorry, I tested my script with Mozilla Firefox 25 - was the same problem. But then I spilled http connection - the newspaper said then 100 response continues and 100 OK data are mixed and gzip'ped. Then I disable deflate module for my Apache Server - and all become Okey! So, I just disable the compaction modules incorrect return data to solve the problem. Web server: apache2-mpm-itk on Debian Linux winded 7.

  • How to deal with error 80070652 downloading Windows 10

    I'm trying to upgrade Windows 7 Professional to Windows 10 but get error 80070652 how clear this to install the upgrade. I'm not a geek, so it should be a simple procedure please. It is a 64-bit operating system

    If the upgrade of Windows 10 Assistant becomes blocked or unresponsive to different percentages: 0%, 32%, 62%, 87%, 99%, please wait at least 4 to 7 hours. If the installation program does not progress, close the wizard and restart your computer. Follow the instructions to upgrade manually by using the tool of creation of media or file ISO for Windows 10.

    If you find it difficult to do some of the steps below, please see instructions how do their:

    http://windows10forum.com/blogs/entry/3-How-to-ensure-a-smooth-upgrade-to-Windows-10-anniversary-update/

    If you encounter an error about enough space to perform the upgrade, see the instructions:

    How to install Windows 10 on devices with limited space

    Task of pre-required

    When you make significant changes to your computer for example updated operating system, you must always back up. See the links to resources on the backup by clicking the link for each version of Windows you are using: Windows XP, Windows Vista, Windows 7, Windows 8/8.1

    Retry the upgrade manually:

    Option 1: Using the media creation tool

    Download the media creation tool

    Click with the right button on the MediaCreationTool.exe file and then click on run as administrator.

    Note: How to check if you are downloaded or installed the update Windows 10 November

    Select upgrade this PC now and then click Next

    Option 2: upgrade using the file ISO for Windows 10.

    Task of pre-required

    When you make significant changes to your computer for example updated operating system, you must always back up. See the links to resources on the backup by clicking the link for each version of Windows you are using: Windows XP, Windows Vista, Windows 7, Windows 8/8.1

    then

    then

    • Turn off (preferably uninstall) your Antivirus utility before you perform the upgrade.
    • Reboot several times, and then try again.
    • Disable the general USB peripherals (for example - smart card reader). You can do so from the Device Manager.
    • If you have an external equipment, attached to the machine, unplug them (example, game controllers, USB sticks, external hard drive, printers, peripherals not essential).
    • Support your default BIOS reset BIOS.
    • Check if there BIOS updates available for your system, and then to apply them.
    • If you are using a SCSI drive, make sure you have the drivers available for your storage on a USB device and it is connected. During the installation of Windows 10, click on the advanced custom Option and use the command load driver to load the driver for the SCSI drive. If this does not work and the installer still fails, consider switching to an IDE based hard drive.
    • Perform a clean boot, restart, and then try again.
    • If you upgrade to the. ISO file, disconnect from the Internet during the installation, if you are connected in LAN (Ethernet) or wireless, disable both, then try to install.
    • If you are updated through Windows Update, when download reaches 100% disconnect from the LAN (Ethernet) Internet or Wi - Fi, then proceed with the installation.
    • If this does not work, try using the. ISO file to upgrade if possible.
    • If you are connected to a domain, go to a local account.
  • How to deal with "error: check the activation.

    I have the 4.5 digital editions on my Windows 7. Download books on my reader Kobo was a battle of the day 1. Now, I get "error: check the activation. As suggested, I'm trying to allow out of my player in order to re - authorize but ADE refuses my password. Any help would be appreciated.

    Windows:

    Close all applications.

    Click Start > run.

    Open, type regedit in the text box and press ENTER. The Registry Editor opens.

    In the left pane of the registry editor, locate the following registry key: HKEY_CURRENT_USER\Software\Adobe\Adept

    Select the key of the follower.

    Choose file > export.

    In the export registry file dialog box, select the branch selected under export range. Enter a name and location for the backup registry key, and then click Save.

    Right click on the key to the follower, and then choose Remove.

    In the dialog box confirm the key deletion, click OK.

    Close the registry editor.

    Open Adobe Digital Editions and reauthorize.

    Macintosh:

    exit the Adobe Digital Editions software.

    Navigate to / Users / / Library/Application Support/Adobe/Digital Editions and drag the activation.dat file to the trash.

    If you use 10.7, see https://helpx.adobe.com/x-productkb/global/access-hidden-user-library-files.html

    Open Adobe Digital Editions and reauthorize.

  • How I deal with error code 202 installing creative application of cloud?

    Bought the creative cloud and cannot even begin. using Mavericks OS on the MacBook Pro 2.4 ghz Intel core i5 with 6 GB of RAM and enough disk space.

    I have older versions of the creative suite 5 and creative suite 3. Do I need to get rid of people?

    Error202.jpg

    You are correct Katieknight3d.  Error 202 indicates well downloaded cannot download or extracted.  If you have tried the suggestions to help ensure a stable Internet connection available in the message #1 so please look at file permissions for your temp under your current user account folder.  It is likely that these file permissions have compromised preventing download clips successfully.

  • How to deal with error code 0 x 643 ('NET Framework 1.1 on Windows XP' installation won, t install automatically and now what?)

    Problem is indicated in the title. What now?

    You mean install an Update for .NET Framework 1.1... KB2833941? If so, try this...

    Download and run the Microsoft .NET Framework repair tool , then visit Windows Update and let it try to reinstall updates. Once it's done, scan again with Windows Update to ensure that they properly installed.

    If this does not fix it try this...

    Uninstall the .NET Framework 1.1.
    Reinstall .NET Framework 1.1
    Download and install. NET Framework 1.1 Service Pack 1
    Visit Windows Update or Microsoft Update and let it install the rest of the 1.1 updates, including KB2833941

  • Dealing with the Dates 2

    Hi guys,.

    I'm not a regular developer, I met always hedges when dealing with dates.

    I have a timestamp column, called 'Calling_date' which stores values as this "24 July 12 AM 05.30.00.000000".

    My report must show the data in this column as "YY-MM-DD hh: mi". I tried two methods but none worked.
    * I won't use To_char *.

    trunc (calling_time, "HH24 DD-MM-YY")
    ORA-01898: too much precision specifier

    TO_DATE (calling_time,'DD-MON-YY hh: mi ')
    ORA-01830: date format picture ends before converting all of the input string

    PLS, tell which can achieve my task.
    Kind regards
    FAteh...

    Fateh says:

    I have a timestamp column, called 'Calling_date' which stores values as this "24 July 12 AM 05.30.00.000000".

    My report must show the data in this column as "YY-MM-DD hh: mi". I tried two methods but none worked.
    * I won't use To_char *.

    Why not use TO_CHAR() ?

    Date and timestamp formats are BINARY formats. Is not a screen formats.

    This means that we MUST convert that binary in a human readable format. TO_CHAR() allows exactly that - convert to a format readable by humans and which allows you to specify exactly what that format is.

  • How to remove newly added line in table advanced

    Hello

    It comes to 12.1.3.

    I have a case of use with advanced table and the "Add Row" button.

    The user can add two lines (empty), field 2 (both part of PK, the two LOVs), then start filling, then realizes he added too many, because the TooManyObjectsException exception is thrown. What would be the 'Nice' way of having the last added row deleted, or some newly added lines to delete if a few lines have been added (before actually trying to commit). I mean how must reference any row that has been added and should be removed - this line do always not PK (PK because not even adjustable due to violation of PK if this makes sense). Is there a fun/easier way to do it? Would be great if someone could share a line or two...

    Thank you

    Anatoliy

    PS

    I have a delete button in a footer with action to fire the event as 'remove' in LICS, I like below, and copy the following code deletes the LAST record in the advanced table, not the one where the cursor is?

    If ("delete".equals (pageContext.getParameter (EVENT_PARAM)))
    {
    String rowRef = pageContext.getParameter (OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    Line OARow = (OARow) am.findRowByRef (rowRef);
    Row.Remove ();
    }

    Asmirnov-Oracle wrote:

    Hello

    Yes, I actually try this approach too.

    Have what approach you tried? 1 or 2?

    If you try to follow the second approach, you can try this?

    OAViewObject srcAppvo = (OAViewObject)findViewObject("SrcAppVO1");
    if (srcAppvo != null) {
        RowSetIterator srcAppRowItr =
            srcAppvo.createRowSetIterator("srcAppRowItr");
    
        try {
            Row srcAppRow;
            srcAppRowItr.setRangeStart(0);
            srcAppRowItr.setRangeSize(srcAppvo.getFetchedRowCount());
            int recCnt = srcAppvo.getFetchedRowCount();
            while (srcAppRowItr.hasNext()) {
                srcAppRow =
                        srcAppRowItr.next();
                if (srcAppRow != null) {
                    if (srcAppRow.getAttribute("SelectFlag") != null &&
                        srcAppRow.getAttribute("SelectFlag").toString().equals("Y")) {
                        srcAppRow.remove();
                    }
                }
            }
        } finally {
            srcAppRowItr.closeRowSetIterator();
        }
    }
    
  • Error blackBerry software - synchronization failed, impossible to deal with organizing data

    I had a Q10 Blackberry last week.  I downloaded and installed the PC of Blackberry link 1.2.2.13 version.  Two-way sync USB worked fine.  Now, all of a sudden, I get the error message "synchronization failed, impossible to deal with organizing data."   I tried to reset the synchronization options, but not joy.  Also tried to uninstall and reinstall the software Link 1.2.2.13, once again no joy.  Any suggestions?

    UPDATE: I spent 4 hours on the phone and the remote session with the help of Blackberry last night.  After doing some troubleshooting to isolate the problem, determined that something on the device caused the problem of Outlook synchronization. One thing I've learned, it's that it can take a long time to synchronize and even though the progress of the screen may appear frozen, let it go until the end - sometimes it took 20-25 minutes, but eventually completed. Here's the process we went through - I would recommend appellant help BB and work with them to make sure you have not accidentally delete Outlook contacts and calendar of important information of your PC or BB device!.

    (1) we tried an uninstall/reinstall the PC Link BB software and that did not fix the problem.

    (2) to isolate the problem of synchronization.  We first did a synchronization of 2 channels 'contacts' and 'calendar' and who was a failure.  Then did a synchronization of only 2 channels 'contacts' and managed.  Then did a synchronization of only 2-way 'calendar' and that was a failure - so the problem was linked to calendar data and something on the device has been the cause of the problem or corrupted.

    (3) link BB allowing us to make a backup complete unit.

    4) then decided to do a 'Wipe security' on the device of BB Q10 to erase all the data and settings and return to a clean boot device configuration.  I was nervous about it - make double sure that Outlook all contacts and calendar data on the device and the PC are completely backed up in case something bad happens.  Nothing serious happened, but I was gald, we made the backup!

    (5) has the 'Security Wipe' feature (on the device, the settings > Security and privacy > wipe security) and phone rebooted without problems (takes a while to do).

    (6) then used link BB to do a sync test 1 channel 'contacts and calendar' from PC to device.  It worked without problem.

    (7) we then used BB link do a "restore" full backup of device, as we did in step 3 above.  It takes a while to make and was a success.

    (8) once the restoration of the aircraft was complete, BB link configured to perform a synchronization of 2 channels of the two 'contacts' and 'calendar '.  Does the synchronization and was a success.  Did a test by adding the new entry of the calendar on PC and did another 2-way sync - all worked very well.  Seems that the problem has been corrected, but will follow in the coming days.

    Lessons learned:

    (1) If you have a lot of Outlook contacts and calendar entries, the synchronization may take a long time.  Be patient and let it run - even if it seems stuck, etc!

    (2) save all Outlook data on the device and the PC to make sure that you have a backup something bad happened during troubleshooting.  We had not something bad happens, but I was gald we made a backup anyway.

    (2) call BB help - support person, I worked with was fabulous, even if it took some time to work through a patch.

     

  • 2012R2 creating a Collection server and adding RDSH completed with errors

    I'm working on the construction of a farm of RDS 2012R2 to be used by thin clients to my installation. I have a farm complete 2008R2 already working and I'm looking to upgrade. Currently, I have 2-2012R2 servers rose with RDS services installed. I assigned Server 1 as the agent of connection and the Desktop Web access server remotely. Server 2 is configured as host of the session. The installation of all the roles of RDS was successful. I configured the gateway desktop remotely, RD, RD Web Access licenses and certificates on my RD connection Broker.

    Initially, I tried to create a collection while the two servers were in my terminal server OR. After many attempts to try to create a session and a lot of research, I found that the GPO settings for RDS servers should be irreversible in order to create a collection with a host of the session. I moved the two servers to a political ORGANIZATION unit block I put in place. I ran a gpupdate/force and restarted both servers. In addition to this, I waited a few hours to ensure that policies no longer apply. I tried to create a collection again and received the same error when it was adding the session host server"SERVER 2 failed to configure the Server Desktop Session host Server 2 remotely. Invalid operation. "I ran a gpupdate/force a few times and tried to create a collection of more than a few times without success. Finally, I deleted all the two servers RDS servers and then reinstalled again. After having everything set up (bridge, Broker for connections, licenses, certificates etc), I try to create a collection again and am greeted with the same error.

    I know that the GPO settings have been deleted because I no longer see the banner of society that is displayed when you log on the server. There are 0 policies applied to this ORGANIZATION and the legacy unit is blocked. I'm not really sure of who apply now. I hope that someone else has experienced this problem and can help you. Thank you

    J

    Hello

    Your question is beyond the scope of what is generally answered in this forum of consumer and would be better suited for the IT Pro TechNet public.

    Please post your question in the TechNet Forums.

    https://social.technet.Microsoft.com/forums/Windows/en-us/home?Forum=w8itpronetworking

    TechNet is watched by other computing professionals who would be more likely to help you.

    Thank you

  • Problems with background due to the error screen change "this feature has been disabled. For more information, contact your administrator"

    When I try to change my wallpaper, I get a message indicating that the feature has been disabled.  Why is this and how can I solve this problem? It says to contact the system administrator for more details.

    Hi Sara Myers,.

    (1) have you been able to change the wallpaper earlier?

    (2) do you use the computer as an administrator?

    You can follow the steps given by Daniel Martín in the link below, dealing with a similar issue

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-desktop/restricted-access-to-wallpaper-changes/065faa71-cbb3-435e-839a-0720a72c3548

    (The steps described in the link above works fine for Windows Vista as well)


    Important
    this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base.
    How to back up and restore the registry in Windows

  • I have already installed creative cloud and illustrator (trial) but when I turn on the computer and restart windows, it fails with error code 16 and need me to remove the program, and reinstall.

    I have already installed creative cloud and illustrator (trial) but when I turn on the computer and restart windows, it fails with error code 16 and need me to remove the program, and reinstall.

    Need help.

    Hello

    Please see the link below.

    Configuration error. CC, CS

    Hope this will help you.

    Kind regards

    Hervé Khare

  • error due to suspicious activity on your computer, call 877-822 9492

    Original title:

    Error message

    I have an error message appears and says "error due to suspicious activity on your computer, call 877-822-9492.

    is it legitimate?

    Unlikely.

    Download, install, execute, update and perform analyses complete system with the two following applications:

    Remove anything they find.  Reboot when necessary.
    (You can uninstall one or both when finished.)

    Search online with eSet Online Scanner.
    Delete everything is found.

    Restart the computer.

    It uses free software that you can uninstall it later if you wish.  Do not turn on or try any free trials when installing things.

  • How to deal with analysis PC Performance & Stability Report

    Yesterday, when I just walked into my Office Xp, an error report in a program called... uh, PC Performance & Stability Report analysis, can possibly be, telling me to correct these errors have shown under its professional service.
    How to deal with him?
    Thank you for your advice it.

    Hello MeriClaybron,

    1. have you installed any show analyzing the program on your computer?

    This problem can be caused due to infection by the Virus. I suggest that you run a virus scan on your computer using Microsoft Safety scanner and check if you have the same problem.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

  • The module "mscomctl.ocx" was loaded but the call to DllRegisterServer failed with error 0x8002801c code.

    Software Access 2003 worked for years. Then received "There is no object in this control" which referred to a control in mscomctl.ocx I used in a form. Then, I got an error, "There was a problem accessing a property or method of the OLE object.".  Then I tried to re - insert the control in the form and got the error "the OLE server is not registered.  Then, I tried to register the OCX with the command 'regsvr32 mscomctl.ocx' BACK and received the 0x8002801c error message in the title of this question.
    Help please!

    Access discussion groups, I found a description of a problem with the controls in Visual Basic 6.0 Runtime Extended Files. Update of security 960715 disables controls in Visual Basic 6.0 Runtime Extended Files.  In my case, the TreeView control is in MSCOMCTL. OCX. It's logical.

    The proposed solution is to download the update on the Visual Basic 6.0 Runtime Extended Files and install.  I did and I now have MSCOMCTL. OCX version 6.1.98.16. I run my Access app and I get the same error, "It is not object in this control".  I re - record MSCOMCTL. OCX, open the form, remove and reinsert the TreeView control.  The same problem.  Will there be another question in the newsgroups dealing with my problem?

    Moreover, the 0x8002801c error went away after installing the Vista SP2.  However, I always get the error "there is no object in this control".

    I studied the problem of killbit described in the FAQ of The Kill - Bit which is suppose to disable certain controls in IE and 'Scenarios of Microsoft Office' (?). I find valid Pheonix-Bit entries in my registry (HKEY_LOCAL_MACHINE Microsoft\Internet Explorer\ActiveX Compatibility\ {...} corresponding to the TreeView control ' killed'.  No change to the error.

    Sometimes miracles happen.  Life is back to normal, and the problem stopped. Microsoft must have fixed in a recent press release or there was divine intervention.

    After you remove the Treeview control on the form and re - insert, the problem has been resolved.  So, the solution is:

    -Install the Visual Basic 6.0 Runtime Extended Files.
    -Remove the Treeview controls on all forms.
    -Re-insert the Treeview controls.

Maybe you are looking for

  • 42 FF - Extensions disappear for about: addons

    I have a few extensions you installed, after a while using Explorer, I go to Modules-> extensions, and it appears:You do not have of this type installed addons. The thing is, all my addons and extensions still work OK! So I go in "get addons" and sea

  • Misleading error about Java plugin

    I use Firefox on Windows 7 64 bit 15.0.1I have Java plugin version SE7 U7, I reinstalled and confirmed is underway. However, when the plugin Java (Java (TM) Platform SE 7 U7 10.7.2.11) is disabled, then I get the message when checking my plugins, "fo

  • Qosmio G10: Write failures, strange noises & locking system on

    Hello IM currently away on holiday with my laptop and im having write failures and strange noises coming from the speaker system and the system of keeps locking up. Any ideas?

  • Downloaded data to guide Media Center ends at 26/12/2011

    I have XP MCE with updates. My MC stopped downloading the guide data beyond 2011-12-26 a week ago. I tried to reconfigure the display to a different ZIP code, change my ISP access, etc, but nothing worked. When I download I get message 'Guide' downlo

  • How to tell you how much ram you can install in your computor

    I have a Dell optiplex 330, Intel (r) Dual CPU and 1.98 GB of ram. How how can I install RAM? Thank you