CAN I DO FORALL OR JUST DO ONE BY ONE PROCESSING IN THIS SCENEARIO

VERSION : ORACLE 11G
I HAVE A FLAT RECORD STRUCTURE WHICH I LOADED INTO LOAD TABLE USING SQL LOADER. AND FROM LOAD TABLE I HAVE TO LOAD INTO MASTER TABLE USING PEOCEDURE.
IF FLAT RECORD STRUCTURE CONSIST OF 4 PERSONS(OWNER1&OWNER_SPOUSE/OWNER2&OWNER2_SPOUSE) I HAVE TO INSERT 4 RECORDS INTO PEOPLE_MASTER.
WHAT IS THE BEST WAY TO DO THAT ????????? LOAD TABLE HAS ABOUT 110 MILLIONS .
LOAD TABLE
EXAMPLE :  PROPERTY ID   OWNER         OWNER_SP OWNER2 OWNER2_SP WE_PID WE_PID_SP WE_PID2 WE_PID_SP2
                   100                 WILLIAMS     AMY           CHUNK      JUDY
INSERT MASTER TABLE
                 ID           OWNER         WE_PID
                 100        WILLIAMS       1
                 101        AMY               2
                 103        CHUNK           3
                 104       JUDY               4
UPDATE LOAD TABLE
               PROPERTY ID   OWNER         OWNER_SP OWNER2 OWNER2_SP WE_PID WE_PID_SP WE_PID2 WE_PID_SP2
                   100                 WILLIAMS     AMY           CHUNK      JUDY       1            2                3              4PLEASE SHARE SOME IDEAS.
PROCEDURE individual
IS
   TYPE people_rec
   IS
      RECORD (
         row_id             VARCHAR2 (100),
         orig_owner_name    VARCHAR2 (100),
         we_pid             NUMBER,
         owner_name         VARCHAR2 (50),                -- owner nane parsed
         owner_first        VARCHAR2 (50),
         owner_last         VARCHAR2 (50),
         owner_middle       VARCHAR2 (20),
         owner_prefix       VARCHAR2 (10),
         owner_suffix       VARCHAR2 (5),
         we_pid_sp          NUMBER,
         owner_name_sp      VARCHAR2 (50),                -- owner nane parsed
         owner_first_sp     VARCHAR2 (50),
         owner_middle_sp    VARCHAR2 (20),
         owner_suffix_sp    VARCHAR2 (5),
         orig_owner_name2   VARCHAR2 (100),
         we_pid2            NUMBER,
         owner_name2        VARCHAR2 (50),                -- owner nane parsed
         owner_first2       VARCHAR2 (50),
         owner_last2        VARCHAR2 (50),
         owner_middle2      VARCHAR2 (20),
         owner_suffix2      VARCHAR2 (5),
         we_pid_sp2         NUMBER,
         owner_name_sp2     VARCHAR2 (100),               -- owner nane parsed
         owner_first_sp2    VARCHAR2 (50),
         owner_middle_sp2   VARCHAR2 (20),
         mail_addr1         VARCHAR2 (100),
         mail_addr2         VARCHAR2 (100),
         mail_city          VARCHAR2 (30),
         mail_state         VARCHAR2 (2),
         mail_zip           VARCHAR2 (10),
         mail_zip4          VARCHAR2 (6),
         match_string       VARCHAR2 (35)
   TYPE people_type
   IS
      TABLE OF people_rec
         INDEX BY BINARY_INTEGER;
   people_tab   people_type;
   --  owner_type 0,2 = individual
   -- process all individual except Trust.
   -- process all records where site address and mail address are same (site_mail_same = Y)
   -- Process records where names are parsed correctly
   CURSOR people_cur
   IS
      SELECT   row_id,
               orig_owner_name,
               fn_get_person_id we_pid,
               owner_name,
               owner_first,
               owner_last,
               owner_middle,
               owner_prefix,
               owner_suffix,
               DECODE (owner_name_sp, NULL, NULL, fn_get_person_id) we_pid_sp,
               owner_name_sp,
               owner_first_sp,
               owner_middle_sp,
               owner_suffix_sp,
               orig_owner_name2,
               DECODE (owner_name2, NULL, NULL, fn_get_person_id) we_pid2,
               owner_name2,
               owner_first2,
               owner_last2,
               owner_middle2,
               owner_suffix2,
               DECODE (owner_name_sp2, NULL, NULL, fn_get_person_id)
                  we_pid_sp2,
               owner_name_sp2,
               owner_first_sp2,
               owner_middle_sp2,
               mail_addr1,
               mail_addr2,
               mail_city,
               mail_state,
               mail_zip,
               mail_zip4,
               match_string
        FROM   (SELECT                                   /*+ PARALLEL( A,16)*/
                      ROWID ROW_ID,
                         CASE
                            WHEN     OWNER_NAME NOT LIKE '%&%'
                                 AND OWNER_FIRST IS NOT NULL
                                 AND OWNER_LAST IS NOT NULL
                            THEN
                               1
                            WHEN     OWNER_NAME LIKE '%&%'
                                 AND OWNER_FIRST IS NOT NULL
                                 AND OWNER_LAST IS NOT NULL
                                 AND OWNER_FIRST_SP IS NOT NULL
                            THEN
                               1
                            ELSE
                               0
                         END
                            owner_flag,
                         CASE
                            WHEN OWNER_NAME2 IS NULL
                            THEN
                               1
                            WHEN     OWNER_NAME2 NOT LIKE '%&%'
                                 AND OWNER_FIRST2 IS NOT NULL
                                 AND OWNER_LAST2 IS NOT NULL
                            THEN
                               1
                            WHEN     OWNER_NAME2 LIKE '%&%'
                                 AND OWNER_FIRST2 IS NOT NULL
                                 AND OWNER_LAST2 IS NOT NULL
                                 AND OWNER_FIRST_SP2 IS NOT NULL
                            THEN
                               1
                            ELSE
                               0
                         END
                            owner_flag_2,
                         owner_name orig_owner_name,
                         REGEXP_SUBSTR (owner_name, '[^&]+') owner_name,
                         owner_first,
                         owner_last,
                         owner_middle,
                         owner_prefix,
                         owner_suffix,
                         TRIM(DECODE (
                                 owner_first_sp,
                                 NULL,
                                 NULL,
                                 owner_first_sp
                                 || REGEXP_REPLACE (
                                       || owner_middle_sp
                                       || ' '
                                       || owner_last
                                       || ' '
                                       || OWNER_SUFFIX_SP,
                                       '( ){2,}',
                            owner_name_sp,
                         owner_first_sp,
                         owner_middle_sp,
                         owner_suffix_sp,
                         owner_name2 orig_owner_name2,
                         REGEXP_SUBSTR (owner_name2, '[^&]+') owner_name2,
                         owner_first2,
                         owner_last2,
                         owner_middle2,
                         owner_suffix2,
                         TRIM(DECODE (
                                 owner_first_sp2,
                                 NULL,
                                 NULL,
                                 owner_first_sp2
                                 || REGEXP_REPLACE (
                                       || owner_middle_sp2
                                       || ' '
                                       || owner_last2,
                                       '( ){2,}',
                            owner_name_sp2,
                         owner_first_sp2,
                         owner_middle_sp2,
                         REGEXP_REPLACE (
                            TRIM(   mail_house_no
                                 || ' '
                                 || mail_dir
                                 || ' '
                                 || mail_street_name
                                 || ' '
                                 || mail_suf),
                            '( ){2,}',
                            mail_addr1,
                         REGEXP_REPLACE (
                            TRIM (mail_unit_pre || ' ' || mail_unit_val),
                            '( ){2,}',
                            mail_addr2,
                         TRIM (REGEXP_SUBSTR (mail_city_state, '\w(.* )'))
                            mail_city,
                         state_code mail_state,
                         mail_zip,
                         mail_zip4,
                         RPAD ('000000000000' || '1', 35, '0') match_string
                  FROM   dq_assessment_load a
                 WHERE       owner_type IN (0, 2)
                         AND owner_name IS NOT NULL
                         AND owner_name NOT LIKE '%TRUST%'
                         AND NVL (owner_name2, 'X') NOT LIKE '%TRUST%'
                         AND site_mail_same = 'Y') T
       WHERE   owner_flag = 1 AND owner_flag_2 = 1;
BEGIN
   OPEN people_cur;
   LOOP
      FETCH PEOPLE_CUR BULK COLLECT INTO   people_tab LIMIT 5000;
      -- INSERT INTO PEOPLE_MASTER ONCE FOR EACH OWNER
      EXIT WHEN people_cur%NOTFOUND;
   END LOOP;
END individual;THANKS
Edited by: new learner on May 12, 2011 7:59 AM
found this solution on this thread i will try this
Using IF with FORALL.
/* Conditional FORALL INSERT... */
22     FORALL i IN aa_ids.FIRST .. aa_ids.LAST
23        INSERT ALL
24           WHEN aa_types(i) = 'TABLE'
25              THEN INTO t1 VALUES ( aa_ids(i), aa_names(i) )
26           WHEN aa_types(i) = 'INDEX'
27              THEN INTO t2 VALUES ( aa_ids(i), aa_names(i) )
28           WHEN aa_types(i) NOT IN ( 'TABLE', 'INDEX' )
29              THEN INTO t3 VALUES ( aa_ids(i), aa_names(i) )
30        SELECT dummy FROM dual;Edited by: new learner on May 12, 2011 8:06 AM

Check this link and follow the simple mantra.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:47458244605081
Also, posting in uppercase is considered shouting in discussion forums. So please try to avoid doing that in the future.
Regards
Raj

Similar Messages

  • I have 2 icloud accounts, can I merge them and just keep one?

    I have 2 icloud accounts, can I merge them and just keep one?

    The simple answer is no
    But some info can be saved and merged.
    When your signed into one account, sign out and save the data you can, to the device.
    Sign into the other account and merge the info.
    Best of Luck

  • Can't connect iTunes Store just in one mac

    I can't connect iTunes Store just in my iMac but is no problem in the iPhone, MacBookAir.
    Anyone can't help me, please?
    Thanks

    Hello there, Mouda27.
    The following Knowledge Base article offers up some great recommendations for troubleshooting your issue with the iTunes Store:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Here are the specifics for working with an iOS device:
    Troubleshoot issues on an iPhone, iPad, or iPod touch
    If you haven't been able to connect to the iTunes Store:
    Make sure your date, time, and time zone are correct in Settings > General > Date & Time.
    Note: Time Zone may list another city in your time zone.
    Make sure that your iOS software is up to date by tapping Settings > General > Software Update (iOS 5 or later) or connecting your iOS device to iTunes and clicking Check for Update on your device's Summary page.
    Check and verify that you're in range of a Wi-Fi router or base station. If you're on a device with cellular service, make sure that cellular data is turned on from Settings > General > Cellular.
    Note: If connected to cellular data, larger items may not download. You may need to connect to Wi-Fi to download apps, videos, and podcasts.
    Make sure that you have an active Internet connection. You can check the user guide for your device for help with connecting to the Internet.
    Make sure that other devices (portable computers, for example) are able to connect to the Wi-Fi network and access the Internet.
    Try resetting (turning off and then on again) your Wi-Fi router.
    If the issue persists, try troubleshooting your Wi-Fi networks and connections.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • I have a separate apple id for itunes and imessenger and facetime can i merge both and just use one?

    I created a yahoo apple id as my main account on my macbook pro but then after a year it had a problem with signing in into imessenger and facetime on both my iphone and ipad so i read a solution from a thread that i need to create another id but it will be a different one and will only be used for my imessenger and facetime. When I tried associating my gmail (one i used for imessenger & facetime), I can't add it on my yahoo apple id account as it is an alternative email add. I just want to use one apple id for everything (icloud, itunes, imessenger and facetime) is there a way to do this? help me please.... thanks!

    Hi Monkey_Dawg,
    Welcome to the Support Communities!
    The articles below may be able to help you with this.
    Click on the links to see more details and screenshots. 
    iTunes Store: Subscribing to iTunes Match
    http://support.apple.com/kb/ht4914
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    Cheers,
    - Judy

  • When I drag a link,there will be two new tabs.One of them is the website,and the other is a website poped by searching the words of the link.I hate the second one.how can i make my firefox just show one new tab?

    just as the quesstion

    Hi - yes I can! I hadn't noticed that little arrow before, thanks.
    However I would really like to stop it hiding the first tab all the time.... Even when I navigate to the first tab using that "list all tabs" arrow, it still remains 'hidden' (i.e. I can't see a tab up the top, even when that tab is active. And when I navigate away from it to another tab, it is invisible again).
    Any ideas?
    Thanks

  • Boot Camp - XP works, but can't log back into OSX, any one else get this?

    So I went through setting up XP on my 2.0 ghz Macbook and everything went smoothly. I have been running various programs in xp, and all the drivers for wireless, brightness control, etc work great. The problem i have is that now i cann't get the computer to start up in OSX. On startup it wants to load XP, so i hold down alt/option until i see the screen with the two harddrive images (one is the Macintosh HD, the other is Windows XP). I select the Mac and it goes to the apple startup screen, then after like 10 min it changes to a blue background and finally i get a cursor, but then after waiting for nearly half an hour, there is no progress. anyone else getting this? any ideas? i'm typing this message from Windows, which still works fine.

    Ahh, the dangers of Windows :P j/j
    Check the Boot Camp forums, I think there are others having this problem. You might try your OS X recovery disc that came with the computer.
    I'd suggest all those with Boot Camp stuff post in that forum, probably get lots more responses!

  • How can I send gifts without credit card? My Apple ID credit is 20 euro, but I can't choose my credit just visa, master card or Amex? This is terrible, because the credit was for gifts.

    I hope anyone has an answer.

    This helped     had to reset the phone after this change and now works! Thanks! :-)     

  • I downloaded an album on itunes using my new itouch; but it's only allowing me to put three songs at any one time into the music app...how can i get it to just move them all in there?

    i downloaded an album on itunes using my new itouch; but it's only allowing me to put three songs at any one time into the music app...how can i get it to just move them all in there?

    hi philly, thanks for getting back to me, especially on such a busy day.
    I don't think that's quite the issue though. I bought an album and it appears in 'my purchases' within the itunes app. Yet, in order to listen to the music, i must use the 'music' app and in this application, there are only three tracks displayed at any one time from my downloaded album.
    I can 'download all' from the 'my purchases' section but that still doesn't help, it just keeps the last three tracks downloaded in the music app.
    I have the 'icloud' enabled and wondered if it had anything to do with that.
    i have successfully downloaded another full album totally into the music app, but this first album is causing me problems.

  • I downloaded pictures onto my iPhone from computer twice by mistake now when i uncheck/sync then check and sync again  i keep getting two lots of pics..how can i get just the one set again? thnx

    I downloaded pictures onto my iPhone from computer twice by mistake now when i uncheck/sync then check and sync again  i keep getting two lots of pics..how can i get just the one set again? thnx

    You're welcome.
    All photos transferred from your computer are stored in the iPhone's Photo Library regardless if you select a single album or folder of photos to be transferred or multiple albums or folders. The photos on the albums or folders of photos include a pointer to the original photos stored in the Photo Library. The photos are not duplicated taking up double the storage space. This way you can view the photos in an album or folder of photos only by selecting the album or folder, or all photos in all albums or folders by selecting Photo Library.
    Makes more sense when transferring multiple albums or folders of photos which cannot be changed when transferring only a single album or folder of photos.
    The same applies with iTunes and music playlists. A song can't be in a playlist unless it is in the main iTunes library. Placing a song in a playlist does not duplicate the song.

  • I`d like to know how can i insert documents, xls/doc/pdf into iCloud and have them in my iPhone and my iPad. I just found one way, through ibooks, but i think it isn't a practical option.

    I`d like to know how can i insert documents, xls/doc/pdf into iCloud and have them in my iPhone and my iPad. I just found one way, through ibooks, but i think it isn't a practical option.

    Just use Drop Box instead.

  • Can't get and use an apple id for cloud or apps or store when i try to change it it will let me but then everytime it keeps asking me to chang e password everytime cant get my computer to just accept one password that will keep

    can't get and use an apple id for cloud or apps or store when i try to change it it will let me but then everytime it keeps asking me to chang e password everytime cant get my computer to just accept one password that will keep

    Just what are you doing and what is the exact wording of the message you are getting?

  • I know my Game Center username and password, but I don't know the email (or maybe apple id) that is for my account. It is not my normal one. I can't log in with just my username, so does anyone know how I can get my email?

    I know my Game Center username and password, but I don't know the email (or maybe apple id) that is for my account. It is not my normal one. I can't log in with just my username, so does anyone know how I can get my email?
    Can you help me please

    Dear
    I have worked renovation of the device and have an account, but I forgot my email
    I do not know E-mail has been linked in game center
    I have a name defined in game center
    Do I have the possibility of knowing E-mail has been linked in game center

  • For some reason, I can not delete bookmarks. I did one at a time, then tried 5 or 6 and it worked once then no more. I then tried 1 at a time and it worked once the no more. This is a brand new computer (Win7) and FF just loaded about 3 hours ago.

    # Question
    For some reason, I can not delete bookmarks. I did one at a time, then tried 5 or 6 and it worked once then no more. I then tried 1 at a time and it worked once the no more. Why is this happening? This is a brand new computer (Win7) and FF just loaded about 3 hours ago. Do not know how the bookmarks even got in there. Some were ok, but no order and some that were never bookmarks. Looks like FF tried to import some BM's from the Virtual XP installed, but did not get it any where near right. I need to completely delete all of them and install from a saved .html file.

    Well, I did not see the exact problem that I was having listed in the articles, BUT the problem is solved for now.
    I opened FF and the Bookmarks to Organize again. I deleted all of the folders and entries, ONE AT A TIME, AND IT WORKED. Evidently, for what ever reason, FF did not like "Batch" deletes of ANY amount greater than 1 and the HANG UP would occur.
    Deleting one at a time then importing the good .html from a good file, loaded the wanted Bookmarks. Yea

  • Have just down loaded Yosemite over Mountain Lion, Indesign CS5 does not work ( Am dependant on it) although Bridge , Light Room and Elements operate OK How do I solve this rapidly. Can any one help on this issue. Thanks

    Have just down loaded Yosemite over Mountain Lion, Indesign CS5 does not work ( Am dependant on it) although Bridge , Light Room and Elements operate OK How do I solve this rapidly. Can any one help on this issue. Thanks

    Sorry to say it, but I think you can see from Bob's response that there's no way to solve this rapidly.
    Did you take an image of your Mountain Lion install before upgrading to Yosemite? Roll back to that. If you're not in the habit of taking a snapshot of your system before performing operating system upgrades - get in that habit. If you are dependent on anything at all on hour computer, having a reliable backup method in place is essential. If you don't have a Time Capsule, or some other way to run Time Machine onto a disk that's not in your computer, go set that up yesterday.
    If you can't just remove Yosemite and roll back to Mountain Lion for whatever reason, you can partition your drive so that you can install both Yosemite and Mountain Lion on the same drive, and then boot into Mountain Lion when you need to work in CS5. Or you can take your Mountain Lion disc (I assume you have one, no?) and then use it to create a virtual machine in something like VirtualBox to run Mountain Lion from inside Yosemite.

  • Can I record everything in just one slide?

    Hello,
    I’m trying to create an 30-second flash animation of
    our software, with some textual callouts. Since I’ve got the
    Adobe Technical Communication Suite, I figured I’d use
    Captivate for the job, but I’m new to it and can’t get
    my head around some things. If someone has the time to point me in
    the right direction, I’d appreciate it. I have tried checking
    the help and rummaging through forums, but still can’t get it
    to work the way I want.
    I’m using the “Full Motion Recording” mode,
    since our software is pretty interactive in real-time and I want to
    show that. All I want is to do is record about 30 seconds of me
    using our software, and afterwards add text callouts here and
    there, before exporting to an .swf file.
    Question 1: Captivate automatically chops up my recording
    into several “slides”, is there a way to make it put
    everything in just one slide? Or set the default time of a slide in
    order to get my entire recording in one single slide? The problem
    is, if I want to place a callout just between two slides…
    well, I can’t do that right? I just want one and the same
    timeline for my entire recording.
    Question 2: After the recording is done, is there a way to
    adjust the speed, or pause, certain segments of the recording? For
    example, if I realize that the viewer of my flash video needs a
    couple of seconds longer to read a certain callout, I want to
    “pause” or “extend” that point in the
    timeline for a bit. Can I do that, or do I need to record the
    entire thing from the beginning and actually pause myself at the
    appropriate time?
    I’d be thankful for all advice and suggestions. I
    realize I’m new to this, so any nudges in the right direction
    would be appreciated!
    /Tom

    Hey there Tom
    From my experience, the only time I need full motion is
    during a drag & drop or scrolling type of action when the view
    "moves" like a film.
    My suggestion is that you plan what you want to do (click
    here, then there, then select that button etc.)
    Step 2 is to start a new project and select "Demonstration"
    as the recording type, spec the size of the recording window if
    needed and start recording (You might want to use auto capture
    which would automatically record all interactions and key strokes,
    but please remember to "manually" capture certain screens using
    Print Screen e.g. after a drop down menu has opened.) (Hint 2 -
    Rather record too many screens than miss one critical one out)
    Step 3 would be to stop recording and edit the individual
    slides with captions, animations etc. At this stage, you can
    specify exactly how long each screen would display, when your
    captions etc appear and for how long they show.
    In summary, a decently built demo has a seperate slide for
    each change in what the user would see on the screen, with FMR
    being used to "tie together" 2 views where a movement action causes
    the transition.
    Hope this helps
    Andrew

Maybe you are looking for

  • Mapping problem Moving Complex Type to field

    Dear all, I am making a message using from RFC(ECC 6.0) to SOAP Some fields of the structure of RFC are: STRUCTURE_VALUE -> Complex Type       END    - NUMC 20       ID        - NUMC 3       COST  - NUMC  5       RATE  - NUMC  6 The structure of Data

  • Tried to update, now nothing works

    Any ideas... My wife tried to update her phone last night and it appears it's broken. All we get is an image of the iTunes icon and a USB cord. Nothing happens. I have tried to do a hard reset but still nothing. Can someone give me a "step-by step" o

  • Why won't Pdf open in new tab

    I have foxit pdf and is set to open in new tab ,but it won't

  • Level of Knowledge in ABAP and Java?

    Hi All, I am seeking a career in SAP Netweaver Process Integration - XI and would like to know what level of knowledge would i need to have in ABAP and Java. If i should have any what are the area's that would be expected. Please Clarify. Your advice

  • How to recover the username of my 8310

    Hi I bought a used Blackberry 8310 the seller give me their password to change the emails accounts in the Blackberry Web page or RIM, but they don't give me their username. Now I can't find the guy and I'm receiving all their emails and can't access