Merge the statement or Update SET =?

Hi I have 3 tables: Agreement_line, nov_10 and nov_10_final.
select CASE WHEN 
             (select count(1)
               from agreement_line
               where policy_no = ff.policy_no
               and ff.incident_date between cover_start_date and cover_end_date
               and agr_line_no <> ff.agr_line_no
               and product_line_id NOT IN ('MPA','INITF','JOINF','ONGNF','SRIA')
               and trans_code <> 0
               and cancel_code = 0
               ) > 0 THEN 'Y' ELSE 'N' END Additional
from nov_10 ff
I'm trying to merge the above query nov_10_final as a new column entitled 'supplementary '.

Nov_10_final is based on Nov_10 and has all of its columns and a few additional ones.

If a merger does not work I can add a column called 'extra' to nov_10 which will follow up to nov_10_final and maybe use a complementary SET update =... .etc

Nov_10_final and nov_10 can be attached on the so-called cla_case_no.
There is also a policy_no in nov_10_final if that helps.
All columns of Nov_10 must stay so I was thinking of a left join but I can't seem to do things.

Any help would be appreciated.

Banner:
Oracle Database 11 g Release 11.2.0.2.0 - 64 bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE 11.2.0.2.0 Production."
AMT for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

Something like that? (not tested):

MERGE
INTO  nov_10_final nf
USING (SELECT ff.cla_case_no
       ,      CASE WHEN COUNT(al.policy_no) > 0 THEN 'Y' ELSE 'N' END additional
       FROM   nov_10         ff
       LEFT JOIN
              agreement_line al
       ON     al.policy_no        = ff.policy_no
       AND    ff.incident_date   BETWEEN al.cover_start_date AND al.cover_end_date
       AND    al.agr_line_no     != ff.agr_line_no
       AND    al.product_line_id NOT IN ('MPA','INITF','JOINF','ONGNF','SRIA')
       AND    al.trans_code      !=0
       AND    al.cancel_code      = 0
       GROUP BY ff.cla_case_no) ff
ON  (nf.cla_case_no = ff.cla_case_no)
WHEN MATCHED THEN
 UPDATE
 SET    additional = ff.additional;

An update statement should work too:

UPDATE nov_10_final nf
set additional = (SELECT CASE WHEN COUNT(al.policy_no) > 0 THEN 'Y' ELSE 'N' END additional
                  FROM   nov_10         ff
                  ,      agreement_line al
                  WHERE  al.policy_no        = ff.policy_no
                  AND    ff.incident_date   BETWEEN al.cover_start_date AND al.cover_end_date
                  AND    al.agr_line_no     != ff.agr_line_no
                  AND    al.product_line_id NOT IN ('MPA','INITF','JOINF','ONGNF','SRIA')
                  AND    al.trans_code      !=0
                  AND    al.cancel_code      = 0
                  AND    ff.cla_case_no      = nf.cla_case_no) ff;

If all the lines of NOV_10 are in NOV_10_final do you still need her?

UPDATE nov_10_final ff
set additional = CASE WHEN
                 (SELECT CASE WHEN COUNT(al.policy_no)
                  FROM   agreement_line al
                  WHERE  al.policy_no        = ff.policy_no
                  AND    ff.incident_date   BETWEEN al.cover_start_date AND al.cover_end_date
                  AND    al.agr_line_no     != ff.agr_line_no
                  AND    al.product_line_id NOT IN ('MPA','INITF','JOINF','ONGNF','SRIA')
                  AND    al.trans_code      !=0
                  AND    al.cancel_code      = 0)
                 > 0 THEN 'Y' ELSE 'N' END;

Tags: Database

Similar Questions

  • Many updates in the statement a update


    Hello

    I have to update the 2 columns in my table based on a condition. Since we can update a value at a time, I use 2 update instructions.

    UPDATE TAB_BALANCE set PTD_FC_BAL = NULL WHERE UPPER (VIEW) = "CDA";

    UPDATE TAB_BALANCE set PTD_USD_BAL = NULL WHERE UPPER (VIEW) = "CDA";

    Can someone tell me if I can update the two columns by using a query that the condition is the same.

    Thanks in advance...

    Since we can update a value at a time, I use 2 update instructions.

    And that is what said you "can update a value at the same time?"

    Simply specify a list separated by commas of the columns and their values:

    UPDATE TAB_BALANCE

    Set PTD_FC_BAL = NULL,

    PTD_USD_BAL = NULL

    WHERE UPPER (VIEW) = "CDA";

  • System restored automatically after the installation of updates & a few missing desktop icons.

    Original title: same set of updates on both computers due to different problems, one problem being a system restore.

    I have two Windows 7 computers in my house.  They all have two problems after installing updates a month ago.  The problem for 'Computer 1' is a bigger problem than the problem of the "Computer 2".  2 computer problem not really seems to be a problem now, but I'll give you the information for comparison purposes. Sorry for the length of this post - I am trying to be thorough.

    1 COMPUTER DETAILS:

    News of the computer: Dell Studio 1745 laptop computer running Windows 7 Home Premium 64 bit, six months at the time of the problem, now age of seven months. It came with Norton pre-installed, never used and uninstalled.  Trend Micro Internet Security installed at the beginning of the use of the computer.  Analyses Micro trend came clean.

    Background: set up with a single account (Administrator, of course) and after a few days of putting in place computer, said ale user account for everyday use.  Computer is configured to warn me before downloading/installation of updates of Windows, with permission for each type of account to install Windows updates.

    While in the standard account, I welcomed these download/install updates and was prompted to restart the computer.  I was done with the computer, so I just closed instead of restart.  According to "Your update history Review", it's updates and they were all successful:

    Update for Windows 7 for x 64-based systems (KB980846)
    Microsoft .NET Framework 4 Client Profile for Windows 7 x 64-based Systems (KB982670)
    Update for Windows 7 for x 64-based systems (KB982519)
    Update Microsoft .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2 for x 64 systems (KB982526)
    Cumulative update for Media Center for Windows 7 x 64-based Systems (KB981078)

    After you turn on computer back, everything seemed normal.  I opened Firefox and I got a notice that Firefox has an update is available, a standard user cannot.  Unlike some programs, there is no popup to sign as an administrator, so I went to start > switch user and signed as an administrator.  (There was no update of Firefox at this point - just a switch single user.) That's where the problem appeared: instead of normally load the admin Office, I had to wait while Windows configured my desk (it's new)... wait... wait... wait... wait... BAM!  Your computer has been successfully restored * insert date here * (I don't remember what it was - January of this year, perhaps - because I was so incredulous that it happened and I continued to watch the game "successfully restored").  I do not have the computer to eat, and it don't has not asked me if I wanted to restore it.  He just did, just on its own initiative, when I went on the admin account.  A bunch of shortcut icons are missing from the Office of the admin acct and the ACCT. standard, and wallpaper to the admin account has been changed.  I am not absolutely sure if nothing else was touched.

    I have searched online to try to understand why it happened, and I remember well from my only find, is that if I went to the restoration of the system, there will be an option to cancel it, but I don't see such an option. So I told the computer to eat on a few days to a week before that updates.  It doesn't seem to help.  Shortcut icons are still missing.  Looked at the update history and it shows the five latest updates as being installed successfully, but Windows Update tells me that I need to these five updates AND this time, the little check marks are only already there on four of the five updates listed.  (The first time, the little checkmarks were already there for all five.)  This is the update that is NOT now pre-checked:

    Microsoft .NET Framework 4 Client Profile for Windows 7 x 64-based Systems (KB982670)

    Do not reinstall the five updates.  I don't know if I should jump install them again, or if I should install only the
    now, four are already "pre-checked."  I'm very hesitant to install KB982670, because this update seems to be the likely cause of the problem given the fact that it is already pré-coché in the Windows and the following information updates for computer 2.

    Since I installed the latest updates for 1 computer with no apparent problems:

    X 64-July Windows malicious software removal tool (KB890830) 2010
    Update security for Windows 7 for x 64-based systems (KB2032276)

    NEWS ON COMPUTER 2:

    The computer news: Systemax desktop running Windows 7 Professional 64-bit, a month at the time of the problem, now age of two months.  It has not come with any pre-installed antivirus.  Trend Micro Internet Security installed at the beginning of the use of the computer.  Analyses Micro trend came clean.

    Reminder: Set up immediately with an admin account and a standard account for everyday use.  Computer has been set to automatically download and install updates for Windows, but is about to inform me first.

    At the time of the problem above with the laptop, desktop computer has been enabled.  As all loading,.
    an error message came that there was some kind of issue with the .NET framework.  At another person asked if he knew what was up with that, and it didn't.  Did not note the specific message, thinking he would tell me again if there was a real problem.  I thought it could have been some kind of Windows hiccups when starting the computer, not even knowing about update problems.  I have yet to see this message.  After the number of laptop (computer 1), I took a peek at the desktop computer (computer 2) to check that Windows Update and I saw that an update is available, which is the referenced above same update that the notebook had already the check mark in its box (KB982670), which gives me the choice to check the little to install it.  Very curious, since, as already mentioned, the computer has been configured to automatically download and install Windows updates.  Looked at the update history, and it has already downloaded and installed the other four updates that the laptop has been.  Changed the automatic Windows Update setting to warn me before you download and install updates.  I have not installed the missing update.  Said the only other person in the House who would probably bother install updates to not install it.

    A month later, 2 computer has a notification from Windows update that 21 or 22 updates are available (as a result, by clicking on the icon of the trial of Microsoft Office).  The update not installed a month ago is no longer on the list, and update history shows as having been installed a few days before, apparently because someone else in the House must have thought it looked like a good idea.  I installed all the 'important' updates and have not seen any more problems with computer 2.

    BACK TO THE COMPUTER 1:

    Yes, is there anyone with ideas on how to get 1 computer back to its state before the 5 updates listed above, and what to do about to reinstall some or all of them, I hope, without more problems, for example a random food system does not happen?  I have a feeling I will say that the random system restoration do not occur, but he did.

    Thanks for any help.

    No, I don't use the Norton removal tool.

    IN RE COMPUTER 1 ONLY:

    1. download the Norton Removal Tool, save it to your desktop: ftp://ftp.symantec.com/public/english_us_canada/removal_tools/Norton_Removal_Tool.exe

    2. close all open applications (that is, anything with an icon on the taskbar).

    3. click right on the file saved in #1 above, and then select run as administrator to run the utility. DO TAP not your keyboard until the race ends, then restart.

    4 for good measure, reset Windows Update by...

    How to reset the Windows Update components?
    -Online skip the section to APPLY to; KB971058 access via I8 32-bit only; Run the difficulty in DEFAULT and modes, then AGGRESSIVE [1]
    http://support.Microsoft.com/kb/971058

    5. restart & test.

    ~~~~~~~~~~~~~~~~~~~~~~~~
    [1] full Disclosure: the difficulty operating in AGGRESSIVE mode will delete your update history (but not list updates in the updates installed)

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Merge using the statement

    Version: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    Hello

    I Merge statement that throws an error that it's an invalid statement, but I do not understand why.

    The statement is:

    MERGE INTO tbs_forecasts_archive tfa
    USING  (SELECT  pub_fc.forecast_id
                   ,pub_fc.last_approved_date
                   ,pub_fc.resource_id
                   ,pub_fc.project_id
                   ,pub_fc.cme_system
                   ,pub_fc.role
                   ,pub_fc.forecast_type
                   ,pub_fc.last_updated
                   ,pub_fc.last_updated_by
                   ,pub_fc.old_forecast_id
                   ,pub_fc.start_date
                   ,pub_fc.end_date
            FROM   published_forecast pub_fc
            INNER JOIN tbs_projects ON tbs_projects.project_id = pub_fc.project_id
            LEFT JOIN tbs_areas ON tbs_areas.area_id = tbs_projects.area_id
            INNER JOIN resources ON resources.resource_id = pub_fc.resource_id
            INNER JOIN tbs_teams ON tbs_teams.team_id = resources.tbs_team_id
            WHERE ( tbs_projects.group_id = :P0_GROUP ) AND
                  ( tbs_projects.area_id = :P86_AREA OR :P86_AREA = 0 ) AND
                  ( tbs_projects.project_id = :P86_PROJECT OR :P86_PROJECT = 0 ) AND
                  ( tbs_teams.team_id = :P86_TEAM OR :P86_TEAM = 0 )
           ) pf
    ON     ( tfa.forecast_id = pf.forecast_id AND
             TRUNC(tfa.baseline_name) = TRUNC(pf.last_approved_date)
           )
    WHEN MATCHED THEN
        UPDATE SET  tfa.resource_id     = pf.resource_id
                   ,tfa.project_id      = pf.project_id
                   ,tfa.cme_system      = pf.cme_system
                   ,tfa.role            = pf.role
                   ,tfa.forecast_type   = pf.forecast_type
                   ,tfa.last_updated    = pf.last_updated
                   ,tfa.last_updated_by = pf.last_updated_by
                   ,tfa.old_forecast_id = pf.old_forecast_id
                   ,tfa.start_date      = pf.start_date
                   ,tfa.end_date        = pf.end_date
    WHEN NOT MATCHED THEN
        INSERT (
                 forecast_id
                ,baseline_name
                ,resource_id
                ,project_id
                ,cme_system
                ,role
                ,forecast_type
                ,last_updated
                ,last_updated_by
                ,old_forecast_id
                ,start_date
                ,end_date
               )
        VALUES (
                 pf.forecast_id
                ,pf.baseline_name
                ,pf.resource_id
                ,pf.project_id
                ,pf.cme_system
                ,pf.role
                ,pf.forecast_type
                ,pf.last_updated
                ,pf.last_updated_by
                ,pf.old_forecast_id
                ,pf.start_date
                ,pf.end_date
                );
    
    

    Can someone explain what's wrong with this statement? It seems that it is a syntax error, but I was not able to find an example that uses multiple tables in select it like that.

    Do I need to provide data and tables?

    Can what additional information I give?

    Thank you

    Joe

    Would be - this pf.baseline_name in your VALUES clause is an invalid reference. TRUNC (pf.last_approved_date) is maybe what you mean?

    Kind regards

    Bob

  • Merger of statement: with several Update statement.

    Hello

    I'm trying under the merge statement. However to get the error "not correctly completed 0ra-00933 sql command.

    In fact, my join conditions are the same, but I wanted to update the different columns based on the different places where clause in the update statement.

    for example.

    FUSION
    IN abc3 tgt
    With the HELP of abc CBC
    WE (src.cust = tgt.cust)
    WHEN MATCHED
    THEN
    UPDATE
    SET tgt.sales = src.sales
    where tgt.cust = 'Cust3'
    UPDATE
    SET tgt.sales1 = src.sales
    where tgt.cust = 'Cust2';

    Please let me know if there is no work around for this.

    Hi, pm

    You can try this please.

    MERGE
     INTO ABC3 TGT
     USING ABC SRC
      ON (src.cust = tgt.cust)
    WHEN MATCHED THEN
    UPDATE SET TGT.SALES = DECODE(TGT.CUST,'Cust3',SRC.SALES,TGT.SALES),
               TGT.SALES1 = DECODE(TGT.CUST,'Cust2',SRC.SALES,TGT.SALES1)
    WHERE TGT.CUST='Cust3' OR tgt.cust='Cust2';
    
  • Insert or update of a row, according to the State of the procedure

    Hi all

    I m new procedures in Oracle. Can some body help out me? I need to insert a line, if there is no line exists for a user. And update, when the record exists. Here are the fields in the table: EMPLOYEE_ID VALUE1, VALUE2, CREATED_DATE, UPDATED_DATE, CREATED_BY, UPDATED_BY.

    If not, line exists, then I want to run this query:

    insert into user_profile (EMPLOYEE_ID, value1, value2, CREATED_DATE, UPDATED_DATE, CREATED_BY, UPDATED_BY) values (31211, 16, 17, Sysdate, sysdate, 31211, 31211);

    And when there is line exist for EMPLOYEE_ID, need to run after the request:

    Update profil_utilisateur the value of VALUE1 = 16, VALUE2 = 17, UPDATED_DATE = sysdate, UPDATED_BY = 31121
    where EMPLOYEE_ID = 31121

    And my procedure takes three values, value1, for example 16, value2 example 17 and username for example 31121

    Thank you for helping me...

    Best regards
    Ashish

    You don't need to create any procedure. you will have to pass the value of empid etc. for the merge as statement:

    MERGE INTO user_profile UP USING (select 1 i_empId,'value' i_value1, 'value2' i_value2 from dual) up2
    on (up.employee_id = up2.i.empid)
    WHEN MATCHED THEN
         update
              set up.VALUE1 = up2.i_value1 ,
                  up.VALUE2 = up2.i_value2,
                  up.UPDATED_DATE = sysdate,
                  up.UPDATED_BY = up2.i_empId
    WHEN NOT MATCHED THEN
         insert into user_profile(up.EMPLOYEE_ID, up.VALUE1, up.VALUE2, up.CREATED_DATE, up.UPDATED_DATE, up.CREATED_BY, up.UPDATED_BY)
                     values(up2.i_empId, up2.i_value1, up2.i_value1, Sysdate, sysdate, up2.i_empId, up2.i_empId); 
    
  • Cannot display the results to the database during "Update": SQL statement

    Hello

    I get this error trying to update a VO via the UI or BCBrowser.

    Cannot display the results to the database during "Update": SQL statement

    This is a default single front & right THAT VO creates on the object of the entity (Database Table)

    On the same table and with the same credentials of DB, I could update the record.

    Any guess on what went wrong?

    Thanks in advance for any help.

    p.s Jdev 11.1.1.6

    Journal:

    oracle.jbo.DMLException: Houston-26041: could not publish data from database in "Update": SQL statement "START the CAR UPDATED CarEO SET SEL_ITEM =: 1 WHERE TXN_NO =: 2 AND LOGID =: AND SEQNO = 3: 4 POLL DELIVERY_MODE, CERTIFICATION_REQ, SOFT_COPY_IND, SELITEM IN: 5,: 6,: 7,: 8; END; ».

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:583)

    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)

    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)

    at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)

    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)

    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)

    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)

    at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)

    at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)

    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)

    at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)

    at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)

    at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)

    to oracle.jbo.uicli.controls.JUNavigationBar$ NavButton.actionPerformed (JUNavigationBar.java:118)

    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

    in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

    at java.awt.Component.processMouseEvent(Component.java:6289)

    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

    at java.awt.Component.processEvent(Component.java:6054)

    at java.awt.Container.processEvent(Container.java:2041)

    at java.awt.Component.dispatchEventImpl(Component.java:4652)

    at java.awt.Container.dispatchEventImpl(Container.java:2099)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

    at java.awt.Container.dispatchEventImpl(Container.java:2085)

    at java.awt.Window.dispatchEventImpl(Window.java:2478)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)

    to java.awt.EventQueue.access$ 000 (EventQueue.java:85)

    in java.awt.EventQueue$ 1.run(EventQueue.java:603)

    in java.awt.EventQueue$ 1.run(EventQueue.java:601)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)

    in java.awt.EventQueue$ 2.run(EventQueue.java:617)

    in java.awt.EventQueue$ 2.run(EventQueue.java:615)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Caused by: java.sql.SQLException: invalid column type

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterInternal(OracleCallableStatement.java:150)

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:399)

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:581)

    at oracle.jdbc.driver.OracleCallableStatementWrapper.registerOutParameter(OracleCallableStatementWrapper.java:1765)

    at oracle.jbo.server.OracleSQLBuilderImpl.bindUpdateStatement(OracleSQLBuilderImpl.java:2243)

    at oracle.jbo.server.EntityImpl.bindDMLStatement(EntityImpl.java:10524)

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:412)

    ... 52 more

    The problem is solved now.

    new columns added to the database table, after the creation of the entity object. Those changes were not picked up in the entity object.

    I found this difference after object entity with the DB Table comparison.

    And when I added these new columns to EO & VO, I don't get this error more.

    Thanks to all who tried to help

  • Execution of statement of UPDATE for the whole table even when the WHERE Clause is presentation

    Hi friends,

    I have a problem in a stored procedure where I wrote an update with a where clause clause statement. At some point only one line should be updated according to the unique identifier in where clause.

    But what is happening is that the Update statement is getting executed for all rows in the table to neglect the WHERE clause. I don't get any idea of why this is happening. Here is the stored procedure and the update statement is BOLD:-

    CREATE OR REPLACE PROCEDURE MDMADM.proc_MDM_InsertCntryDetails
    (
    CntryMasterCode IN VARCHAR2,
    CntryName IN VARCHAR2,
    MDMUser IN VARCHAR2,
    Exists IN ITS ENTIRETY,
    status in VARCHAR2,
    Inserted_By IN VARCHAR2 default NULL,
    Modified_By IN VARCHAR2 default NULL,
    Mdm_Code IN the DEFAULT NUMBER 0.
    Action in VARCHAR2 DEFAULT 'Add ',.
    XGenAttNames IN VARCHAR2 default NULL,
    XGenAttValues IN VARCHAR2 default NULL,
    MirusAttNames IN VARCHAR2 default NULL,
    MirusAttValues IN VARCHAR2 default NULL,
    GenisysAttNames IN VARCHAR2 default NULL,
    GenisysAttValues IN VARCHAR2 default NULL,
    XGenModify IN VARCHAR2 default NULL,
    MirusModify IN VARCHAR2 default NULL,
    GenisysModify IN VARCHAR2 default NULL
    )

    IS

    strSQLXGen VARCHAR (1000);
    strSQLMirus VARCHAR (1000);
    strSQLGenisys VARCHAR (1000);
    nMaxMDMCode INTEGER.
    ifExist INTEGER;

    /******************************************************************************
    NAME: proc_MDM_InsertCntryDetails
    PURPOSE:

    REVISIONS:
    Worm Date Description of the author
    --------- ---------- --------------- ------------------------------------
    1.0 03/07/2009 1. Created this procedure.

    NOTES:

    Keywords to replace automatically available Auto:
    Object name: proc_MDM_InsertCntryDetails
    SYSDATE: 03/07/2009
    Date and time: 03/07/2009, 19:11:20 and 03/07/2009-19:11:20
    User name: (put in TOAD Options, editor of the procedure)
    Name of the table: (defined in the dialog box "New PL/SQL object")

    ******************************************************************************/
    BEGIN

    COUNT (*) of SELECT INTO ifExist OF MDM_COUNTRY_MASTER;

    IfExist IF = 0 THEN
    SELECT 1 INTO nMaxMDMCode FROM DUAL;
    ON THE OTHER
    SELECT MAX (MDM_CODE) + 1 IN MDM_COUNTRY_MASTER nMaxMDMCode;
    END IF;


    IF Action = "add" THEN

    INSERT INTO MDM_COUNTRY_MASTER(MDM_CODE,MDM_MASTER_CODE,MDM_DESCRIPTION,MDM_USER,MDM_EXIST,MDM_STATUS,MDM_ACTION,DAT_INSERT_DATE,DAT_INSERTED_BY)
    VALUES(nMaxMDMCode,CntryMasterCode,CntryName,MDMUser,exist,Status,action,sysdate,Inserted_By);

    strSQLXGen: = ' INSERT IN MDM_COUNTRY_MAPPING (MDM_CODE, SYSTEM_NAME, SYSTEM_CODE,' |) XGenAttNames | DAT_INSERTED_BY, DAT_INSERT_DATE) ' |
    "VALUES (' |)" nMaxMDMCode | ',' || '''' || "XGen | '''' || ',1,' || XGenAttValues | ',' || '''' || Inserted_By | '''' || SYSDATE)';

    EXECUTE IMMEDIATE strSQLXGen;

    strSQLMirus: = ' INSERT IN MDM_COUNTRY_MAPPING (MDM_CODE, SYSTEM_NAME, SYSTEM_CODE,' |) MirusAttNames | DAT_INSERTED_BY, DAT_INSERT_DATE) ' |
    "VALUES (' |)" nMaxMDMCode | ',' || '''' || "Mirus | '''' || ',2,' || MirusAttValues | ',' || '''' || Inserted_By | '''' || SYSDATE)';

    EXECUTE IMMEDIATE strSQLMirus;

    strSQLGenisys: = ' INSERT IN MDM_COUNTRY_MAPPING (MDM_CODE, SYSTEM_NAME, SYSTEM_CODE,' |) GenisysAttNames | DAT_INSERTED_BY, DAT_INSERT_DATE) ' |
    "VALUES (' |)" nMaxMDMCode | ',' || '''' || "Genisys | '''' || ',3,' || GenisysAttValues | ',' || '''' || Inserted_By | '''' || SYSDATE)';

    EXECUTE IMMEDIATE strSQLGenisys;

    ON THE OTHER



    UPDATE MDM_COUNTRY_MASTER
    SET MDM_DESCRIPTION = CntryName, DAT_MODIFIED_BY = Modified_By, DAT_MODIFY_DATE = SYSDATE.
    MDM_USER = MDMUser, MDM_ACTION = Action, MDM_STATUS = status MDM_EXIST = exist WHERE MDM_CODE = Mdm_Code;




    COUNT (*) of SELECT INTO ifExist FROM MDM_COUNTRY_MAPPING WHERE SYSTEM_CODE = 1 AND MDM_CODE = Mdm_Code;

    IfExist IF = 0 THEN

    strSQLXGen: = ' INSERT IN MDM_COUNTRY_MAPPING (MDM_CODE, SYSTEM_NAME, SYSTEM_CODE,' |) XGenAttNames | DAT_INSERTED_BY, DAT_INSERT_DATE) ' |
    ' VALUES(' ||) Mdm_Code | ',' || '''' || "XGen | '''' || ',1,' || XGenAttValues | ',' || '''' || Modified_By | '''' || SYSDATE)';

    EXECUTE IMMEDIATE strSQLXGen;

    ON THE OTHER
    strSQLXGen: = "UPDATE MDM_COUNTRY_MAPPING SET | XGenModify | ', DAT_MODIFY_DATE = SYSDATE, DAT_MODIFIED_BY =' | '''' || Modified_By | '''' || "WHERE MDM_CODE =' | ' Mdm_Code | "and SYSTEM_CODE = 1';

    EXECUTE IMMEDIATE strSQLXGen;

    END IF;


    COUNT (*) of SELECT INTO ifExist FROM MDM_COUNTRY_MAPPING WHERE SYSTEM_CODE = 2 AND MDM_CODE = Mdm_Code;

    IfExist IF = 0 THEN

    strSQLMirus: = ' INSERT IN MDM_COUNTRY_MAPPING (MDM_CODE, SYSTEM_NAME, SYSTEM_CODE,' |) MirusAttNames | DAT_INSERTED_BY, DAT_INSERT_DATE) ' |
    ' VALUES(' ||) Mdm_Code | ',' || '''' || "Mirus | '''' || ',2,' || MirusAttValues | ',' || '''' || Modified_By | '''' || SYSDATE)';

    EXECUTE IMMEDIATE strSQLMirus;

    ON THE OTHER
    strSQLMirus: = "UPDATE MDM_COUNTRY_MAPPING SET | MirusModify | ', DAT_MODIFY_DATE = SYSDATE, DAT_MODIFIED_BY =' | '''' || Modified_By | '''' || "WHERE MDM_CODE =' | ' Mdm_Code | "and SYSTEM_CODE = 2';

    EXECUTE IMMEDIATE strSQLMirus;

    END IF;


    COUNT (*) of SELECT INTO ifExist FROM MDM_COUNTRY_MAPPING WHERE SYSTEM_CODE = 3 AND MDM_CODE = Mdm_Code;

    IfExist IF = 0 THEN

    strSQLGenisys: = ' INSERT IN MDM_COUNTRY_MAPPING (MDM_CODE, SYSTEM_NAME, SYSTEM_CODE,' |) GenisysAttNames | DAT_INSERTED_BY, DAT_INSERT_DATE) ' |
    ' VALUES(' ||) Mdm_Code | ',' || '''' || "Genisys | '''' || ',3,' || GenisysAttValues | ',' || '''' || Modified_By | '''' || SYSDATE)';

    EXECUTE IMMEDIATE strSQLGenisys;

    ON THE OTHER
    strSQLGenisys: = "UPDATE MDM_COUNTRY_MAPPING SET | GenisysModify | ', DAT_MODIFY_DATE = SYSDATE, DAT_MODIFIED_BY =' | '''' || Modified_By | '''' || "WHERE MDM_CODE =' | ' Mdm_Code | "and SYSTEM_CODE = 3';

    EXECUTE IMMEDIATE strSQLGenisys;

    END IF;



    END IF;



    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHILE OTHERS THEN
    -Consider recording the error and then re-raise
    LIFT;
    END proc_MDM_InsertCntryDetails;
    /


    Thank you

    >
    WHERE mdm_code = mdm_code
    >

    This will always be value true - similar to WHERE 1 = 1.

    You typed it wrong or is the same as the variable column name? If they are the same test rename one of them.

  • Impossible to update plugins, because the "State of the plugin" page links to plain text

    Left in the Add-ons Manager, I clicked on "check to see if your plugins are up to date. When the State results page displayed, is in plain text, like this:

    Potentially vulnerable plugins
    State of plugin action
    Outdated plugins
    State of plugin action
    Unknown plugins
    State of plugin action
    These plugins are up to date
    State of plugin action

    There is nothing to click on update a plugin. Whenever I open the Add-ons Manager - even when I search for new Add-ons, I feel this style of formatting of plain text.

    I clicked by mistake on "Mark it as resolved. FredMcD response has not solved the problem.

    He must have had a little problem in the Web site because 2 days later, everything worked perfectly normal.

  • NB520, NB550D - how to set the volume to the State of sleep and music?

    I'm looking for an opportunity to adjust the volume to the State of sleep and the music...
    The mere fact that I noticed is that volume depends on the defined level when the computer was working. But how do I change the State of sleep and the music when the comp is off swich?

    Hi communication,

    I checked the user manual and found the following information:
    The volume control and mute setting may be different between the Windows mode and the mode of sleep and the music. Before connecting the audio device to the computer, turn down the volume of the audio device. Sound quality can also be different.

    So based on this information, you will need to adjust the volume in Windows, but it might be a little different. I have not found any information on the change of volume in sleep mode and music.

  • I xp2000 media edition spk 3 IE 7. I get rejected on the updates saying not loaded. 7 so far. until the message I see is unable to read the statement to the 0x76c941a9 location. a reference could not be found for this problem on the microsoft system.

    Help, please

    Hi gsduhn

    Welcome to the Microsoft Answers Forum!

    I recommend that first of all uninstall Internet explorer 7 on your computer. Follow the steps listed below in the link uninstall: http://support.microsoft.com/kb/927177

    Then reset windows update components, then try to install the updates, check if the problem is resolved. It has Fix tool link below will help you with the same

    How to reset the Windows Update components: http://support.microsoft.com/kb/971058

    Once the rest is complete install internet explorer 7 manually from the link below:

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=9AE91EBE-3385-447C-8A30-081805B2F90B&displaylang=en

    And install the update to the clean boot. To help resolve the error and other messages, you can start Windows Vista by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    How to run check and clean boot if you have the problem.

    i. click Start, click run, type msconfigand click OK.

    II. the System Configuration utility dialog box appears.

    III. in the System Configuration utility dialog box, click the general tab and then click Selective startup.

    IV. Click to uncheck the Process SYSTEM. INI file check.

    v. Click to uncheck the process to WIN. INI file check.

    VI. Click to clear the Load Startup items check box. Check The Load System Services and to use Original BOOT. INI are checked.

    VII. click on the Services tab.

    VIII. Click to select the hide all Microsoft Services check box.

    IX. click disable all, and then click OK.

    x when you are prompted, click restart to restart the computer.

    XI. install the stand alone update.

    Reset the computer to start as usual

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    i. Click Start, type msconfig.exe in the start search box and press ENTER.

    II. If you are prompted for an administrator password or for confirmation, type your password, or click on continue.

    III. on the general tab, click the Normal startup option and then click OK.

    IV. When you are prompted to restart the computer, click on restart.

    Here is the link for the same thing: http://support.microsoft.com/default.aspx/kb/310353

    Thank you, and in what concerns:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I am unable to access the Windows XP updates and unable to set up the automatic update. I have not given an error code. I was only told I can't perform these functions.

    I am unable to access the Windows XP updates and unable to set up the automatic update.  I have not given an error code.  I was only told I can't perform these functions.  I don't have the windows disk that the computer came preloaded with Windows and I don't remember the Administor password I created 5 years ago.  Can anyone help?

    Assume that:

    http://support.Microsoft.com/kb/316524

    You receive an error message 'Administrators' only when you try to visit the Windows Update Web site or the Microsoft Update Web site

    http://support.Microsoft.com/kb/189126

    Microsoft's strategy concerning lost or forgotten passwords

    What I can offer: http://support.microsoft.com/kb/321305

    How to connect to your Windows XP-based computer if you forget your password or if your password expires

  • Windows 8 apps is not up-to-day, continue to show "Pending" when I look at the State of windows applications update 8

    Dear team,

    I use the laptop dell inspiron with windows operating system 8. Apps Windows 8 does not get updates, continue to show "Pending" when I look at the State of windows applications update 8, I haven't downloaded or installed all the other apps, but I'm trying to update the applications integrated Windows 8 came with the computer dell laptop. I have high speed internet. I installed McAfee total protection subscribed when the purchase of the laptop.
    Please help free for applications update of Windows 8.

    Finally, I found a solution. Go to troubleshooting (press win + w > then type troubleshooting). a window now opens in the office. Click on "solve problems with windows updates. Now click Next. Windows will search for solutions, but he can't find anything. Then, windows will ask if you want to try in administrator mode. Click Yes. Windows will find and fix the problem. That's all.

  • DPS: Judge to use the parameter Raster or vector in the States of the objects when the majority of the page is a photo. What is the best setting for the overall performance?

    I am trying to decide whether to use the parameter Raster or vector in the States of the object when the majority of the screen is a picture (with a modest but important legend for children to read). The legend certainly makes it look more net as vector. But does the photo! The raster setting seems to make the lower-res images in comparison. In my first edition of my application, I thought that raster would be the best setting when the photo was the subject dominating the page. But now, after seeing how strong he looks like vector, (but with almost a refresh of the unacceptable time. Perhaps better on the latest iPad. Most of my readers/students in class will use iPad 2 s, which has a slower processor). I wonder if I should go through the trouble of changing States of photo objects that have the type as well to the vector. It doesn't seem to be as sensitive to a re - draw on the iPad 2 (non-retine)

    Is Filesize hit if I make about 1200 on these objects range from Raster to vector? (It is a huge, highly interactive history book, so I'm curious if acutally go to vector on these photos would reduce the size of the file) What is the best setting for the overall performance?

    I see the freeks screen outside for a bit if you try to pinch and zoom in a vector object (photo) vs raster. Which is disappointing. Does slow down load time/refreshment in frame, which is a little less. I also found that the drop shadows really bad that redraws effect in vector, almost vibrating in a slide show, for example. Thus, in cases where I need shadows, I'm sticking with Raster.

    All tips go ahead?

    Brian

    Does that help? http://boblevine.us/Digital-Publishing-Suite-101-keep-text-sharp-in-raster-slideshows/

  • I have created my version of Office Web site, but when I try to transfer them to the phone or Tablet setting it does not merge the info previously created on the desktop

    I have created my version of Office Web site, but when I try to transfer them to the phone or Tablet setting it does not merge the info previously created on the desktop

    Hello

    When you try to create a layout of desktop-based Tablet or phone you can get 3 options open to copy the layout of office. This do not understand the content placed in the pages.

    However, you can view each page individually and can copy the contact that you want to move the tablet or phone. then open the same presentation page of the Tablet/phone and use Edit > paste in Place then move and resize the elements according to the size of the layout.

    You can also take a look at the link below to better understand the available phone/tablet.

    Jam Muse: Designing for mobile devices in Muse - YouTube

    Please let me know if you need help for the same.

    Concerning

    Vivek

Maybe you are looking for

  • Toshiba NB200 erratic starting

    My NB200 turned moody exactly 10 days after the expiration of the warranty. Initially he does not restart, I had to turn it off and on again. It's not always turning on when I press the power button, in fact it shows the green lights for the power bu

  • Forcepad HP EliteBook Folio 1040 G1

    Hello I love the new ForcePad and I would use it at work. I use the external keyboard and the monitor at work and does not work with Forcepad built into the laptop. Is it possible to connect the external Forcepad via USB or similar? Thank you very mu

  • 9068 system resources:

    LabVIEW RT 2013 NOR-9068. I use the Session information of the system to check for problems. This is the result Why is the capacity of the primary hard drive more big block available memory, free primary disk, 0? Thank you

  • What is the Windows Installer requires a drive of market research?

    all of a sudden when I try to print something a box appears saying that the ' '...      "WINDOWS INSTALL NEEDS A DISC"MARKET RESEARCH. " I DOWNLOADED ALL THE PATCHES FOR XP AND ALSO DELETED AND REINSTALLED THE PRINTER.  WHAT IS THE MICROSOFT REPAIR I

  • S.N.I.D. Where can I find it on the computer?

    I need to know my snid number or serial number of the computer system. How can I find?