Performance problem with SQL for recovering data in FACT and Dimension Table

Hello

We have a query that performs very slow when extracting data in FACT and the DIMENSION Table.

SQL and Plan are in the attachment.

Please suggest how this can be improved.

The version of DB is 11.2.0.4

Kind regards

VN

Slow is a very relative term, for about 1 hour is slow for some 1s is slow. So please always quantify your settings.

The first thing caught my eye is done 4 times ia_oasis_tot_prov_cur_d access. Try to isolate which and change it like this and see if it returns the same result.

select case when a.clm_capitn_ia_bil_prov_edw_sk = b.prov_edw_sk then b.prov_id end ben_billing_prov
     , case when a.clm_capitn_attnd_prov_edw_sk  = b.prov_edw_sk then b.prov_id end ben_attending_prov
     , case when a.clm_capitn_ia_pcp_edw_sk      = b.prov_edw_sk then b.prov_id end ben_pcp_number
     , case when a.clm_capitn_ia_ipa_prov_edw_sk = b.prov_edw_sk then b.prov_id end ben_ipa_number
  from edw.clm_capitn_f partition (jan2015) a
  left join
       edw.ia_oasis_tot_prov_cur_d b
    on (
           a.clm_capitn_ia_bil_prov_edw_sk = b.prov_edw_sk
        or a.clm_capitn_attnd_prov_edw_sk  = b.prov_edw_sk
        or a.clm_capitn_ia_pcp_edw_sk      = b.prov_edw_sk
        or a.clm_capitn_ia_ipa_prov_edw_sk = b.prov_edw_sk
       )

If it works this means allows you to reduce certain I/O.

Tags: Database

Similar Questions

  • Having problems with SQL Developer connection to the database on a LINUX machine

    Having problems with SQL Developer connection to the database on a LINUX machine
    Hello
    I am trying to connect my machine to windows 7 Home premium to an oracle database 11 g on RedHat 5 machine using SQL Developer. I got this error on SQL Developer
    Status: Failed - Test has failed: the network adapter could not establish the connection


    on Linux
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date                03-APR-2013 16:13:13
    Uptime                    7 days 22 hr. 16 min. 41 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/product/11.2.0/db_1/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.X.X.X)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orc11g" has 1 instance(s).
    Instance "orc11g", status READY, has 1 handler(s) for this service...
    Service "orc11gXDB" has 1 instance(s).
    Instance "orc11g", status READY, has 1 handler(s) for this service...
    Service "orc11g_XPT" has 1 instance(s).
    Instance "orc11g", status READY, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL>
    and TNSPING
    tnsping 172.x.x.x
    
    TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 11-APR-2013 14:32:17
    
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    
    Used parameter files:
    /u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
    
    Used EZCONNECT adapter to resolve the alias
    Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=172.x.x.x))(ADDRESS=(PROTOCOL=TCP)(HOST=172.x.x.x)(PORT=1521)))
    OK (0 msec)
    [oracle@ltebilling ~]$
    Tnsnames.ora on Linux,
    ORC11G =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x.x)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orc11g)
    )
    )
    Listner on Linux,
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
    (PROGRAM = extproc)
    )
    )
    
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x.x)(PORT = 1521))
    )
    )
    hosts/ect/Linux,
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1               localhost.localdomain localhost
    172.x.x.x             LTEBilling
    and there is no problem to ping linux from windows

    Published by: user11309581 on April 11, 2013 15:16

    user11309581 wrote:
    as I have already desciped earlier, I can't connect to the server throw Linux my Windows SQL Server, with error message below.
    tatus: failed - Test has failed: the network adapter could not establish the connection

    It's too generic to mean anything. The application is hidden the real error message. You got when you did the tnsping and obtained "TNS-12535: TNS:operation has expired. Now THAT's an error.

    This indicates a problem firewall and routing. You said earlier you could ping the server, but now we see tnsping fails. Two different protocols of usage, so that both the successful ping turns out a valid physical path, it guarantees not that all traffic will pass. What happens with

    c:\ telnet 172.x.x.x 1521
    
  • Connection problem with SQL Developer 3.0.0.4

    I have a strange problem with SQL Developer (SD) 3.0.0.4. So that the implementation of a new connection I have in double entries listed for some of the databases listed in my TNSNAMES.ora file. When I try to connect to one of the databases has entered duplicated, I get the following Oracle error:
    ORA-01034: Oracle not available ORA-27101: Kingdom does not exist SVR4 shared memory error: 2: no files or directory
    however, if I try to connect to the same database using SQL * more or TOAD, it works perfectly and TOAD has no duplicates.

    At first, I thought maybe that SD has been reading multiple copies of the TNSNAMES.ora so I checked and removed all the duplicate files and set the variable of environment TNS_ADMIN to point to that and the single instance of the TNSNAMES.ora file. Yet once, SQLPlus and TOAD to work fine, but SD is always showing entries twice and always have reported the above error when I try to connect to a database with a duplicate entry. I should mention, I'm able to connect to the database that have only a single entry listed use SD.

    If I understand correctly, SD uses JDBC as underlying connection mechanism. Based on this "agreement" I thought that maybe I had a file corrupted in the Java Cache, so I cleared the cache, but I always get errors.

    As mentioned, I use SQL Developer 3.0.0.4 with Java 1.6.0_11 (included in the download). In addition, I have installed JRE 1.6.0_24 and I am running Windows XP SP3. Any ideas or suggestions are greatly appreciated.

    Craig...

    Hi Craig,.

    Or, if I have misunderstood completely the scenario you describe, here's a post on the forum about duplicate entries appear in the drop-down list Alias network when the connection Type is TNS:

    Developer SQL 2.1.0.63 TNS name in characters of the connection

    This solution involves clean a bad TNSNAMES. ORA file with double score entries to test the death of SID.

    -Gary

  • problems with updates for Windows (for Win XP)

    I have problems with Windows (for Win XP) updates...
    (1) I installed the hardware updates for my sound card (via Windows update) and now I can't hear the music through my speakers or headphones.  In addition, related to my sound card software do not work either!
    (2) at the same time, I tried to install Microsoft .NET Framework 1.1 Service Pack 1 through Windows Update and that would not install (.. .and I tried several times).

    So to rememdy those issues, I tried for hours to use the system restore, but whenever I've tried I'm not able to successfully restore and I tried several unique restore points.
    Any suggestions?  I spent hours on it, and nothing seems to help!

    Hello hoke, welcome.

    1. What is the brand and model of your computer?

    Let us know if it works:

    1. download the .NET Framework here cleaning tool:
    http://blogs.msdn.com/astebner/attachment/8904493.ashx

    2. run the utility and remove all versions of the .NET Framework
    3. restart your computer

    ---
    After the reboot
    ---

    4. download the .NET Framework 3.5 from here:
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4e35-B531-508D977D32A6&displaylang=en

    5. next, restart your computer

    Let us know if it works,

    Thank you! Ryan Thieman
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I have a problem with the simulation in Matlab 6.5 and LabVIEW for PID controllers

    I have a problem with the simulation in Matlab 6.5 and LabVIEW. I have a few methods for granting regulators PID in MATLAB to go but not of LabVIEW. Degree of international teams of two transfer but when I passed to the fourth degree is no longer working. We have changed the formula to calculate the parameters for the fourth year and gave me some good values for assignment of Matlab, but when I put on LabVIEW are not resolved. the formulas are available in PDF format and are. Please help me and me someone if possible. Thank you
    Lim.4 generation in comparison methods and the MATLAB program settings are for the service of transfer to the second degree.

    Hello Lascarica,

    I noticed that you are using the screw of PID. Gains on these screws are based on TIME instead of GAIN. You should be able to build a PID regulator and vary the gains and then compare the results.

  • Problems with drivers for laptop HP650

    Hello

    I have a problem with drivers for this model.
    I have installed windows 7 32 bit, then removed all the drivers from the official website of HP, but a problem with the two drivers, PCI SIMPLE COMMUNICATIONS CONTROLLER and CONTROLLER ASSISTED, now I can't connect to Internet, LAN or wireless internet.

    Is there a solution?

    Hello:

    This is the driver you need for the PCI SCC.

    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=321957&prodSeriesId=5225011&prodNameId=5225013&swEnvOID=4062&swLang=13&mode=2&taskId=135&swItem=ob-104656-1

    In order to find the right driver for the wireless card (since there may be one of several different model wireless cards in your notebook), go to Device Manager and click on the network controller needing drivers and display the material for her ID.

    If you don't know how to find the hardware ID, please read the info on the link below:

    http://www.DeviceDriverFinder.com/blog/device-drivers/how-to-check-the-hardware-ID-for-a-Windows-device

  • Problem with pdf for the opening of the health gov Web site.

    Problem with pdf for the opening of the health gov Web site. I use my ipad in Safari and have installed the application to adobreader. Healthcare gov support only suggested to disable the pop-up blocker. I did, and I couldn't always open the file. No problem on a desktop computer regardless of the browser.

    In my view, they spend on their web server to a document ECM server authentication. Someone else has the problem?

    I tried the Penguin, Chrome and Atomic browsers on the ipad and the same issue.

    Thank you!

    Keren

    Okay, actually, I think that there is a problem with the type of form. It is a form of a special kind (called a form XFA or Designer, for what it's worth), which can be opened with Adobe Reader and only on Mac or Windows. There is no iPad software that can read these.

  • Problem with livemail, upgrade Windows 7 to 10 and back again

    Separated from this thread.

    Hello

    Having problem with livemail, improved Windiws 7 to 10 and then uninstalled immediately revert to the original with option to the program (things not working not properly).   All rolled back does OK no message or data errors.

    Now all the direct mail has duplicated, will remove some, but others won't.

    Can you post help or solution, please

    John

    It seems that many of those who go back to Windows 7 from Windows 10 experience a corruption of the store folder (the folder where messages, calendars and the account settings are stored). According to your storage folder is how complex (several accounts, calendars a lot, a lot of messages number of files), it can be simpler to just create a new storage folder and fills again:

    1. Looking at your list of messages in Windows Live Mail, press Ctrl-Shift-O for Options. On the Advanced tab, click Maintenance and then store the file. Copy the path to locate the storage folder.
    2. Close Windows Live Mail and wait a few minutes (the program will continue to run in the background, while he does his household).
    3. Press the Windows key + E to open an Explorer window, and then paste or type the path that you copied to the (1) in the address bar and press ENTER. This should open your storage folder.
    4. Right-click on the name of the folder in the navigation pane, and select Rename. Call the Live Mail Backup.
    5. A repair must check that all the program files are present and correct and properly registered, as appropriate. To do this, close all running programs, and then press Windows key + R, type wlarp and press ENTER. In the window that opens, select repair all Windows Essentials programs:


      When it is finished, restart the computer.

    6. Start Windows Live Mail and wait the program installs before doing anything. Press Ctrl-Shift-T to start the add your Assistant e-mail accounts and follow the prompts to add your e-mail accounts.
    7. Click once on the work online on the status bar and deconnecter disconnect Internet to avoid interference email downloads, and then use the file > import messages (I Alt - F) and point the wizard to the Live Mail Backup folder level. Do not intervene while the import happens.
    8. Leave the program alone for a while (an hour or two, or even a night or more) to enable him to reindex all your messages, then close and wait half an hour for the program to do his household.
    9. Relaunch the program and look at your messages under folder imported into storage folders. Take it slow, drag files out of any folder and drop in the location you want. Again, give the program time to re - indexing messages in their new location.

    Note that you can not drag files out of storage files. If you want to forward messages to a high plu account folder in the folders pane, you need to select messages to transfer, and then use the right click > move or copy folder. The controls are also available as buttons in the folders of the Ribbon tab.

  • Problem with El Captain (5.1.7 server) and the management of permissions

    Hello world

    I have a big problem with our Mac Mini Server (El Captain) and the server program.

    In recent weeks, the server didn't give the permissions of a folder.

    for example:

    Mr. X had permission to read and write to a folder.
    Mr Y too.

    Mr. X has create a new folder one record something in it.

    Mr Y had the permission to read or write to the folder create Mr. x. But he should have.

    Or

    Mr. X has save a file to a folder

    When he opens it again it is write protected and cannot be replaced.

    So you have to save under a different name in the same folder.

    And every time he save/close the file.

    Anyone know what could be the problem?

    Thank you

    Greetings from the Germany

    Chris

    My guess:

    A few weeks ago someone messed with the permissions on your server and made a mistake. So, you got an inappropriate list ACL (Access Control), which is rampant in the file and must be removed or fixed.

    http://www.TechRepublic.com/blog/Apple-in-the-enterprise/introduction-to-OS-x-AC cess-control-lists-ACL.

    C.

  • I keep getting emails telling me that if I do not answer with my name, password, Date of birth and the country or territory my Windows Live will be Shut Down

    I keep getting emails telling me that if I do not answer with my name, password, Date of birth and the country or territory my Windows Live will be Shut Down.  The person who sends me emails is also with MSN.  Everyone knows this?  Thanks for your help.

    Thank you for visiting the Microsoft answers community.

    The question you have posted is bound using Windows Live (Messenger) and would be better suited in the Center to help Windows Live Messenger. Please visit this link to find a community that will provide the support you want.

  • I have currently problems with control panel Nvidia causing black outs and computer freezing/not not be able to start.

    I have currently problems with control panel Nvidia causing black outs and computer freezing/not not be able to start.

    1) update your nVidia/software drivers to the latest version for your model video card + operating system.

    (2) check that the equipment is not defective.

    This is not a Microsoft / number of the operating system.  For additional troubleshooting - contact the manufacturer (nVidia).

  • I have the problem with my language of keyboard, the fact is I can't add or remove languages from keyboard

    Hi all
    I have the problem with my language of keyboard, the fact is I can't add or remove languages from keyboard
    When I press the keyboard button change that nothing happens, but in the event viewer I get the following message
    The failing application name: Rundll32.exe_shell32.dll, version: 6.1.7600.16385, time stamp: 0x4a5bc9e0
    Name of the failed module: input.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdf4f
    Exception code: 0xc0000005
    Offset: 0 x 0000000000003756
    ID of the process failed: 0xf5c
    Start time of application vulnerabilities: 0x01cd697d57b60837
    The failing application path: C:\Windows\system32\Rundll32.exe
    Path of the failing module: C:\Windows\system32\input.dll
    Report ID: 95fbd586-d570-11e1-8bfb-c860006d193a
    Can someone help me with this? or maybe there's another way to change the keyboard languages? for example through registry?
    Thanks in advance
    I HAVE Windows 7 x 64

    Hello

    I suggest to create a new user account and check.

    Create a user account.

    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account

    If the problem does not occur in the new user account, I suggest you to fix a corrupted user profile.

    Fix a corrupted user profile.

    http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

  • Having a problem with my computer I try to restart and get BSOD saying internal error Planner video background

    Original title: Blue Screen of Death (BSOD)

    Hello im having a problem with my computer I try to reboot and I get BSOD saying internal error Planner video background

    Here is my mini dump file:

    https://onedrive.live.com/redir?RESID=60FEBF11B9A3D76! 4807 & authkey =! AGKWUp-ndI0XBgE & ithint = the file % 2cdmp

    and here is my system info:

    https://onedrive.live.com/redir?RESID=60FEBF11B9A3D76! 4810 & authkey =! AFloWJarqiE83QM & ithint = the file % 2cnfo

    im hoping that this will let you know what is wrong or not

    RW

    This phenomenon was linked to your video driver (atikmpag.sys) /DirectX.  I would completely remove the current driver and install the latest driver available.

  • I am running windows vista and am warned there is a problem with windows media center, restart my computer and try again. It did not work. Help

    I am running windows vista and am warned there is a problem with windows media center, restart my computer and try again. It did not work. Help

    Run the Setup again.

    Open WMC > tasks > settings > General > installation Windows Media Center > rerun the installation

    Does that help?

    If the above does not help then try to reset WMC: -.

    Open Control Panel > uninstall a program > turn Windows features on or off > scroll multimedia features > uncheck the box against Windows Media Center > follow the instructions on the screen > Reboot > open again to turn Windows features on or off in the control panel > scroll multimedia features > check the box against Windows Media Center.

    Now reconfigure WMC again

  • Problem with the creation of date range with PL/SQL WHERE clause

    Hello, everyone:

    I'm unable to develop and the SQL statement to filter records today and seven days back. My condition is as follows:
     from  wsualumni.wsu_online_giving_table
           --where ALM_OG_ACTIVITY_DATE >= ALM_OG_ACTIVITY_DATE - 7
           where ALM_OG_ACTIVITY_DATE >= SYSDATE - 7
           and ALM_OG_CAMPAIGN_CODE = 'MED' 
           OR ALM_OG_CAMPAIGN_CODE = 'MED1';
    I think I'm to mess with the (to_char (ALM_OG_ACTIVITY_DATE, ' mm/dd/yyyy ' ")) statement.

    The actual code is below to:
    set serveroutput ON SIZE 1000000
    set heading off                
    set feedback off                
    set trimspool off               
    set echo off                    
    set pagesize 0                  
    
    DECLARE
        v_data_line_hdr      varchar2(1000);
        v_data_file          varchar2(80);
        v_sch_code            varchar2(10);
        v_instance_name       varchar2(10);
        ws_path            payroll.pybutfl.pybutfl_utl_file_path%TYPE; 
        v_data_line           VARCHAR2 (4000)                              := NULL;
        fhandle_o             UTL_FILE.file_type;
        v_line_count          NUMBER                                       := 0;
        v_selected_count      NUMBER                                       := 0;
        v_error_count         NUMBER                                       := 0;
        v_written_count       NUMBER                                       := 0;
        v_error_text          VARCHAR2 (50)       := ' Unable to write the line. ';
        v_errm                VARCHAR2 (255);
        v_sqlerrm             VARCHAR2 (255);
    
    
    CURSOR C1 IS
    
    select RTRIM
        (
        ALM_OG_ID                                           ||'|'||                                                                 
        NULL                                                ||'|'||   
        (to_char(ALM_OG_AMOUNT, '999,999.99'))              ||'|'||            
        'Cash'                                              ||'|'||             
        'Credit Card'                                       ||'|'||             
        (to_char(ALM_OG_ACTIVITY_DATE, 'mm/dd/yyyy'))       ||'|'||                    
        ALM_OG_ACCI_CODE                                    ||'|'|| 
        'On-Line Giving'                                    ||'|'||       
        'On-Line giving'                                    ||'|'||    
        ALM_OG_HONOR_MEM_NAME                               ||'|'||        
        NULL                                                ||'|'||   
        'Do not post'                                       ||'|'|| 
        'StandardThankYou'                                  ||'|'||  
        'Not Acknowledged'                                  ||'|'||        
        'Do not receipt'                                    ||'|'||      
        NULL                                                ||'|'|| 
        'Banner Gift Number'                                ||'|'|| 
        ALM_OG_BANNER_GIFT_NO ||'.'|| ALM_OG_ACCI_CODE      ||'|'|| 
        (to_char(ALM_OG_ACTIVITY_DATE, 'mm/dd/yyyy'))       ||'|'|| 
        NULL                                                ||'|'|| 
        'Web ID'                                            ||'|'|| 
        ALM_OG_WEBID                                        ||'|'|| 
        NULL                                                ||'|'|| 
        'Source'                                            ||'|'||  
        ALM_OG_CAMPAIGN_CODE                                ||'|'||
        'On-Line Giving'    ) data_line 
        
           
           from  wsualumni.wsu_online_giving_table
           --where ALM_OG_ACTIVITY_DATE >= ALM_OG_ACTIVITY_DATE - 7
           where ALM_OG_ACTIVITY_DATE >= SYSDATE - 7
           and ALM_OG_CAMPAIGN_CODE = 'MED' 
           OR ALM_OG_CAMPAIGN_CODE = 'MED1';
           
           
           
     CURSOR C2 IS
     
     select RTRIM(
                    'ConsID'        ||'|'||
                    'GFImpID'       ||'|'||
                    'GFTAmt'        ||'|'||
                    'GFType'        ||'|'||
                    'GFPayMeth'     ||'|'||
                    'GFDate'        ||'|'||
                    'FundID'        ||'|'||
                    'CAMPID'        ||'|'||
                    'GFAppeal'      ||'|'||
                    'GfRef'         ||'|'||
                    'GfPostDate'    ||'|'||
                    'GfPostStatus'  ||'|'||
                    'GfltrCode'     ||'|'||
                    'GfAck'         ||'|'||
                    'GfRcpt'        ||'|'||
                    'GfAttrlmpID00' ||'|'||
                    'GfAttrCat00'   ||'|'||
                    'GfAttrdesc00'  ||'|'||
                    'GfAttrDate00'  ||'|'||
                    'GfAttrlmpD01'  ||'|'||
                    'GfAttrCat01'   ||'|'||
                    'GfAttrdesc01'  ||'|'||
                    'GfAttrlmpID02' ||'|'||
                    'GfAttrCat02'   ||'|'||
                    'GfAttrdesc02'  ||'|'||
                    'GfSubType'      ) line_header      from DUAL;
                    
                    
    
    /**********************************************************************/
    /*                Main Program Processing                             */
    /**********************************************************************/
    
    BEGIN
    
    
    
    
    DBMS_OUTPUT.put_line ('Program Started in wsualumni.wsu_online_giving_online');
    IF UTL_FILE.is_open (fhandle_o)
        THEN   
       UTL_FILE.fclose (fhandle_o);
    END IF;
    
    /* Name The File Here */
    v_data_file := ('MED_SCH_' || TO_CHAR(sysdate, 'dd-MON-yyyy') || '_OG_DATA.txt');
    
    
    
    SELECT RTRIM (pybutfl_utl_file_path)
          INTO ws_path
          FROM payroll.pybutfl;
    
    
    
          fhandle_o := UTL_FILE.fopen (ws_path, v_data_file, 'w');
          DBMS_OUTPUT.put_line ('UTLFILE file for this run is: ' || ws_path||'/'||v_data_file);
          v_written_count := 0;   
          
          
        
    FOR c2_rec IN C2 LOOP
        BEGIN
            v_selected_count := v_selected_count + 1;
            v_data_line_hdr := rtrim(c2_rec.line_header);
            UTL_FILE.put_line (fhandle_o, v_data_line_hdr);
            v_written_count := v_written_count + 1;
    EXCEPTION
         WHEN OTHERS
          THEN
           DBMS_OUTPUT.put_line (v_error_text);
           v_error_count := v_error_count + 1;
        END;
    END LOOP;
    
    
    FOR c1_rec IN C1 LOOP
        BEGIN
            v_selected_count := v_selected_count + 1;
            v_data_line := rtrim(c1_rec.data_line);
            UTL_FILE.put_line (fhandle_o, v_data_line);
            v_written_count := v_written_count + 1;
        EXCEPTION
         WHEN OTHERS
          THEN
           DBMS_OUTPUT.put_line (v_error_text);
           v_error_count := v_error_count + 1;
        END;
    END LOOP;
    
         DBMS_OUTPUT.put_line ('Number of Records Selected: ' || v_selected_count);
         DBMS_OUTPUT.put_line ('Number of Records Written: ' || v_written_count);
    
          IF UTL_FILE.is_open (fhandle_o)
          THEN
             UTL_FILE.fclose (fhandle_o);
          END IF;
    
    
    
    
    END;
    /
    Results
    ConsID|GFImpID|GFTAmt|GFType|GFPayMeth|GFDate|FundID|CAMPID|GFAppeal|GfRef|GfPostDate|GfPostStatus|GfltrCode|GfAck|GfRcpt|GfAttrlmpID00|GfAttrCat00|GfAttrdesc00|GfAttrDate00|GfAttrlmpD01|GfAttrCat01|GfAttrdesc01|GfAttrlmpID02|GfAttrCat02|GfAttrdesc02|GfSubType
    000013505||      20.00|Cash|Credit Card|06/22/2009|221686|On-Line Giving|On-Line giving|||Do not post|StandardThankYou|Not Acknowledged|Do not receipt||Banner Gift Number|1179534.221686|06/22/2009||Web ID|000013505||Source|MED|On-Line Giving
    000013505||      20.00|Cash|Credit Card|06/22/2009|770830|On-Line Giving|On-Line giving|||Do not post|StandardThankYou|Not Acknowledged|Do not receipt||Banner Gift Number|1179534.770830|06/22/2009||Web ID|000013505||Source|MED|On-Line Giving

    Hello

    The problem is due to the "OR" condition (I did not pay attention to it earlier).

    Because of this condition, your query is given beyond 7 days recovery. You need to rewrite the code as:

    ALM_OG_CAMPAIGN_CODE in ('MED', 'MED1')
    

    Instead of

       and ALM_OG_CAMPAIGN_CODE = 'MED'
         OR ALM_OG_CAMPAIGN_CODE = 'MED1';
    

    This will do the magic for you.

    Concerning

    Asif Momen
    http://momendba.blogspot.com

Maybe you are looking for

  • Cannot open videos or movies to youtube in coming emails

    YouTube is green and the other accessories are blackened, but you can hear the audio

  • trouble opening my imovie external archives

    I have Mac OS X 10.9.5 and Imovie version 10.0.4. I have an Imovie library stored on an external hard drive. Now when I click on "open library" and select the external drive, I get the following message: "The operation could not be completed. One or

  • Satellite Pro M10: 10 on map wifi error code

    I have a Satellite M10 with a intel 2100 3B card (I think) which gives an error "code 10". Device cannot start (Code 10)

  • A50 DVD will not write. Advice please.

    I recently bought an A50. I loaded the DVD s/w provided on the Toshiba-badged CD (# PMR400165EU0). This package contains WinDVD Creator 2 among others. But when I select Create a movie he almost immediately says "cannot complete the burning process.

  • 8E5E03FB error code display; undefined problem.

    I am a computer Tech that just repaired/recovered this system VISTA Ultimate using the MFG recovery disk.  The system repaired very well, but it will now refresh.  * THE INITIAL CAUSE of the problem was when the customer off its system while the SP-2