Please help me to assign a new Id for different people

version 11g

Please help me in new id of person assiging for dirrerent so people it's middle name is different
I've listed on three scenarios in the example below. Please help me

WITH NAMES AS( 
 /* Scenario1 -- Three dirrerent people so assign Three diffrrent ID,
                  keeping 1 id as is and assign two new ids from sequence*/
 SELECT 47540310 ID , 'WO' LAST_NAME , 'ROBERT' FIRST_NAME , 'C' MIDDLE_NAME FROM DUAL UNION ALL  
 SELECT 47540310 ID , 'WO' LAST_NAME , 'ROBERT' FIRST_NAME , 'W' MIDDLE_NAME FROM DUAL  UNION ALL  
 SELECT 47540310 ID , 'WO' LAST_NAME , 'ROBERT' FIRST_NAME , 'X' MIDDLE_NAME FROM DUAL  UNION ALL  

  /* Scenario2 NULL can be equal to any value if there is only one value to equate with 
    In the below case we have two values that can equate with null so assign three diffrent ids */
 
 SELECT 47540300 ID , 'AMATUZIO' LAST_NAME , 'ALBERT' FIRST_NAME , 'J' MIDDLE_NAME FROM DUAL UNION ALL  
  SELECT 47540300 ID , 'AMATUZIO' LAST_NAME , 'ALBERT' FIRST_NAME , NULL MIDDLE_NAME FROM DUAL  UNION ALL 
 SELECT 47540300 ID , 'AMATUZIO' LAST_NAME , 'ALBERT' FIRST_NAME , 'L' MIDDLE_NAME FROM DUAL  UNION ALL

  /* Scenario3 NULL can be equal to any value if there is only one value to equate with 
    In the below case we have ONE VALUE  that can equate with null so DONT ASSIGN ANY IDS*/
 SELECT 17540300 ID , 'AMARONE' LAST_NAME , 'JOSEPH' FIRST_NAME , 'J' MIDDLE_NAME FROM DUAL UNION ALL   
 SELECT 17540300 ID , 'AMARONE' LAST_NAME , 'JOSEPH' FIRST_NAME , NULL MIDDLE_NAME FROM DUAL

 )
 Select * from names
 
 o/P Required
 ID    LAST_NAME    FIRST_NAME    MIDDLE_NAME

47540310    WO      ROBERT          C
99999990    WO      ROBERT          W                   -- New Sequence Number
99999991     WO      ROBERT         X                   -- New Sequence Number
47540300    AMATUZIO    ALBERT    J
99999992    AMATUZIO    ALBERT                          -- New Sequence Number
99999993    AMATUZIO    ALBERT    L                     -- New Sequence Number
17540300    AMARONE    JOSEPH    J
17540300    AMARONE    JOSEPH    
Thank you

Published by: new learning June 7, 2012 14:12

I do not understand what does this line:

FIRST_VALUE (fn_get_person_id) - sequence to function

I feel that the only difference with my query is to select distinct values, do not consider duplicates. Correct me if I'm wrong.

For me, this should give the same result as your query:

WITH NAMES AS ( /* Scenario1 -- Three dirrerent people so assign Three diffrrent ID, keeping 1 id as is and assign two
new ids from sequence*/
               SELECT   47540310 ID,
                        'WO' LAST_NAME,
                        'ROBERT' FIRST_NAME,
                        'C' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   47540310 ID,
                        'WO' LAST_NAME,
                        'ROBERT' FIRST_NAME,
                        'C' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   47540310 ID,
                        'WO' LAST_NAME,
                        'ROBERT' FIRST_NAME,
                        'W' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   47540310 ID,
                        'WO' LAST_NAME,
                        'ROBERT' FIRST_NAME,
                        'X' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               /* Scenario2 NULL can be equal to any value if there is only one value to equate with
                 In the below case we have two values that can equate with null so assign three diffrent ids */
               SELECT   47540300 ID,
                        'AMATUZIO' LAST_NAME,
                        'ALBERT' FIRST_NAME,
                        'J' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   47540300 ID,
                        'AMATUZIO' LAST_NAME,
                        'ALBERT' FIRST_NAME,
                        NULL MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   47540300 ID,
                        'AMATUZIO' LAST_NAME,
                        'ALBERT' FIRST_NAME,
                        'L' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               /* Scenario3 NULL can be equal to any value if there is only one value to equate with
                 In the below case we have ONE VALUE  that can equate with null so DONT ASSIGN ANY IDS*/
               SELECT   17540300 ID,
                        'AMARONE' LAST_NAME,
                        'JOSEPH' FIRST_NAME,
                        'K' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   17540300 ID,
                        'AMARONE' LAST_NAME,
                        'JOSEPH' FIRST_NAME,
                        'Y' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   17540300 ID,
                        'AMARONE' LAST_NAME,
                        'JOSEPH' FIRST_NAME,
                        NULL MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   17540300 ID,
                        'AMARONE' LAST_NAME,
                        'JOSEPH' FIRST_NAME,
                        'M' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   17540300 ID,
                        'AMARONE' LAST_NAME,
                        'JOSEPH' FIRST_NAME,
                        'M' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   99999999 ID,
                        'LO' LAST_NAME,
                        'CHRISTY' FIRST_NAME,
                        NULL MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   99999999 ID,
                        'LO' LAST_NAME,
                        'CHRISTY' FIRST_NAME,
                        'M' MIDDLE_NAME
                 FROM   DUAL
               UNION ALL
               SELECT   99999999 ID,
                        'LO' LAST_NAME,
                        'CHRISTY' FIRST_NAME,
                        'M' MIDDLE_NAME
                 FROM   DUAL),
 sel_names AS (  SELECT id
                          , last_name
                          , first_name
                          , middle_name
                          , COUNT (middle_name) OVER (PARTITION BY id ORDER BY middle_name) cnt
                          , ROW_NUMBER () OVER (PARTITION BY id  ORDER BY middle_name) rown
                       FROM (SELECT DISTINCT * FROM names) -- use SELECT DISTINCT here to remove duplicates
                   ORDER BY 1, 2, 3, 4
                   )
SELECT 8888888 new_id, id, last_name, first_name
     , middle_name
  FROM sel_names
 WHERE cnt > 1 AND rown > 1;

As you can see I have just replace the table with a view of inline using SELECT DISTINCT *.

                       FROM (SELECT DISTINCT * FROM names) -- use SELECT DISTINCT here to remove duplicates

For the new id I put a dummy value 888888, you can use a function or sequence according to your needs.

Kind regards.
Al

Tags: Database

Similar Questions

  • Please, help me to by merging the same id assining people

    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    Please help me
    We_addr_id defines the Address.
    We_pid     Defines the Person.
    
    i am planning to merge the same person together by assigining the same we_pid.
    WITH merge_names AS (SELECT   1000 We_pid,
                                  999898989 We_addr_id,
                                  'DONALD' first_name,
                                  'BOATRIGHT' last_name,
                                  'L' middle_name,
                                  NULL Suffix FROM DUAL
                                  UNION ALL
                                  SELECT   1001 We_pid,
                                  999898989 We_addr_id,
                                  'DONALD' first_name,
                                  'BOATRIGHT' last_name,
                                  'LARRY' middle_name,
                                  NULL Suffix
                           FROM   DUAL
                         UNION ALL
                         SELECT   1002 We_pid,
                                  999898989 We_addr_id,
                                  'DONALD' first_name,
                                  'BOATRIGHT' last_name,
                                  NULL middle_name,
                                  NULL Suffix
                           FROM   DUAL
                         UNION ALL
                         SELECT   33065 WE_PID,
                                  99000000 We_addr_id,
                                  'LUNA' First_name,
                                  'JOSE' last_name,
                                  NULL middle_name,
                                  NULL suffix
                           FROM   DUAL
                         UNION ALL
                         SELECT   8450527 WE_PID_LINK,
                                  99000000 We_addr_id,
                                  'LUNA' First_name,
                                  'JOSE' last_name,
                                  'A' middle_name,
                                  NULL suffix
                           FROM   DUAL
                         UNION ALL
                         SELECT   373453429 WE_PID_LINK,
                                  99000000 We_addr_id,
                                  'LUNA' First_name,
                                  'JOSE' last_name,
                                  NULL middle_name,
                                  NULL suffix
                           FROM   DUAL
                         UNION ALL
                         SELECT   442303062 WE_PID,
                                  99000000 We_addr_id,
                                  'LUNA' First_name,
                                  'JOSE' last_name,
                                  'S' middle_name,
                                  NULL suffix
                           FROM   DUAL
                         UNION ALL
                         SELECT   30088775765 WE_PID,
                                  990000878 We_addr_id,
                                  'BILL' last_name,
                                  'RAY' first_name,
                                  'M' middle_name,
                                  NULL SUFFIX
                           FROM   DUAL
                         UNION ALL
                         SELECT   30088775766 WE_PID,
                                  990000878 We_addr_id,
                                  'RAY' first_name,
                                  'BILL' last_name,
                                  NULL middle_name,
                                  NULL SUFFIX
                           FROM   DUAL
                         UNION ALL
                         SELECT   30088775767 WE_PID,
                                  990000878 We_addr_id,
                                  'RAY' first_name,
                                  'BILL' last_name,
                                  'MAX' middle_name,
                                  NULL SUFFIX
                           FROM   DUAL
                         UNION ALL
                         SELECT   30088775768 WE_PID,
                                  990000878 We_addr_id,
                                  'RAY' first_name,
                                  'BILL' last_name,
                                  'MICHEL' middle_name,
                                  NULL SUffix
                           FROM   DUAL
                         UNION ALL
                         SELECT   399998776 WE_PID,
                                  9901111 We_addr_id,
                                  'ELLISON' first_name,
                                  'LAWRANCE' last_name,
                                  NULL middle_name,
                                  NULL SUFFIX
                           FROM   DUAL
                         UNION ALL
                         SELECT   399998777 WE_PID,
                                  9901111 We_addr_id,
                                  'ELLISON' first_name,
                                  'LAWRANCE' last_name,
                                  'J' middle_name,
                                   'JR' SUFFIX
                           FROM   DUAL
                         UNION ALL
                         SELECT   399998778 WE_PID,
                                  9901111 We_addr_id,
                                  'ELLISON' first_name,
                                  'LAWRANCE' last_name,
                                  'JAMES' middle_name,
                                   'SR' SUFFIX
                           FROM   DUAL
                         UNION ALL
                         SELECT   399998779 WE_PID,
                                  9901111 We_addr_id,
                                  'ELLISON' first_name,
                                  'LAWRANCE' last_name,
                                  'JACK' middle_name,
                                  'JR' SUFFIX
                           FROM   DUAL)
    SELECT   *
      FROM   merge_names
      o/p Required
    
    WE_PID    WE_ADDR_ID        FIRST_NAME    LAST_NAME    MIDDLE_NAME    SUFFIX      MERGE_WEPID
    1000            999898989       DONALD    BOATRIGHT    L                          1000
    1001            999898989       DONALD    BOATRIGHT    LARRY                      1000
    1002            999898989       DONALD    BOATRIGHT                               1000
    33065           99000000        LUNA        JOSE                                  33065
    8450527         99000000        LUNA        JOSE       A                          8450527
    373453429       99000000        LUNA        JOSE                                  33065
    442303062       99000000        LUNA        JOSE       S                          442303062
    30088775765     990000878       BILL        RAY        M                          30088775765
    30088775766     990000878       RAY         BILL                                  30088775766
    30088775767     990000878       RAY         BILL       MAX                        30088775767
    30088775768     990000878       RAY         BILL       MICHEL                     30088775768
    399998776       9901111         ELLISON     LAWRANCE                              399998776 
    399998777       9901111         ELLISON     LAWRANCE    J        JR               399998777  
    399998778       9901111         ELLISON     LAWRANCE    JAMES    SR               399998778
    399998779       9901111         ELLISON     LAWRANCE    JACK     JR               399998777
    Thank you

    Hello

    Interesting problem!

    That's what you asked for:

    WITH    got_min_we_pid  AS
    (
         SELECT     merge_names.*
         ,     MIN (we_pid) OVER ( PARTITION BY  first_name
                                     ,                  last_name
                            ,            middle_name
                            ,            suffix
                            )     AS min_we_pid
         FROM    merge_names
    )
    ,     possible_matches       AS
    (
         SELECT     CONNECT_BY_ROOT min_we_pid     AS min_we_pid
         ,     we_pid                    AS leaf_we_pid
         FROM     got_min_we_pid
         WHERE     CONNECT_BY_ISLEAF  = 1
         START WITH   we_pid                = min_we_pid
         CONNECT BY   first_name             = PRIOR first_name
              AND  last_name                = PRIOR last_name
              AND  SUBSTR ( 'x' || middle_name
                       , 1
                       , LENGTH ('x' || PRIOR middle_name)
                       )                   = 'x' || PRIOR middle_name
              AND  'x' || middle_name    > 'x' || PRIOR middle_name
              AND  'x' || suffix        = 'x' || PRIOR suffix
    )
    ,     got_match_cnt     AS
    (
         SELECT DISTINCT
              min_we_pid
         ,     leaf_we_pid
         ,     COUNT (DISTINCT leaf_we_pid) OVER (PARTITION BY  min_we_pid)     AS match_cnt
         FROM     possible_matches
    )
    SELECT       c.*
    ,       NVL (p.leaf_we_pid, c.min_we_pid)     AS merge_wepid
    FROM              GOT_MIN_we_pid  c
    LEFT OUTER JOIN      got_match_cnt   p   ON  p.min_we_pid     = c.min_we_pid
                                      AND p.match_cnt     = 1
    ORDER BY  c.last_name
    ,            c.first_name
    ,       c.middle_name
    ;
    

    Here's how it works:
    First of all, we take care of the exact replica, by finding the we_pid lowest for each group defined by (first_name, last_name, middle_name, suffix). For example, the two lines for Jose Luna (no middle name) are assigned to the min_we_pid = 33065. It is this min_we_pid, not the original we_pid, that is used in all future operations.
    Then we are all names other names that are similar, but more comprehensive, using a CONNECT BY (subquery possible_matches) query. The parents in this query are stored with short middle_names, and children are lines that have first_name, last_name identical and suffix, but middle_names longer. I concatenated the x at the beginning of all middle_names for comparisons, to treat the NULL as being less at, but similar to something else. Is so, that we had a group of lines with identical names (and suffixes) with the exception of the middle_names, then
    NULL middle_name might be a parent got ', "DEB" and "DEBORAH",.
    A ' would be a parent of "DEB" and "DEBORAH", and
    "DEB" would be a parent of 'DEBORAH '.
    By following this chart until we find the lines that have no children, we may associate each short middle_name with the similar longer middle_name, or names. At this point, we will have "BILL RAY" as the ancestor of 'RAY MAX BILL' as well as "RAY MICHEL BILL". Here comes the following subquery, got_match_cnt. If notes how many descendants are associated with each ancesotor, in other words, how much longer names might match a name more runs. If this number is greater than 1, we do not consider one of the matches. That is why match_cnt = 1 is one of the join conditions in the main query, where each row in the theoriginale table is related to its more relative, when it exists, and if it is unique.

  • Please help me! I had downloaded trail for lightroom now after... the serial key is requested for each adobe software? It was my dads macbook? and I don't know the old serial key? Please help, please help me! I had downloaded the trail for the light

    I was hoping to try version track Lightroom which was unssecesful now expires, can I use the adobe program I have in my macbook, the serial key is required for all software please help me...

    In an open forum, no one can help with a problem of serial number

    You must contact Adobe personnel to help
    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)

    Creative cloud support (all creative cloud customer service problems)
    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

    or

    Serial number and activation support (non - CC)

    http://helpx.Adobe.com/x-productkb/global/Service1.html

  • BlackBerry smartphones * code Please HELP ANYONE * error 507 and new for BlackBerry!

    I bought my new Blackberry "BOLD", the Manager of office installed on my computer and Device Manager installed as well for the "BOLD" of 4.7.  When I plugged in my camera for the first time to fund manager began through a procedure and update the phone.  After a few minutes he said it was a mistake of some sort, that the backup was on the computer and use to fund manager transfer on the phone.  I opened the Desktop Manager, and does not recognize the phone.  Give me just a DTM vacuum with no connection and no option either.  Please someone help me, this causes a lot of stress for a new phone.

    Ok!!  I solved my problem (with the help of MANY people here or by phone).  I wanted to implement EXACTLY what I've done so that no one has yet this headache.

    This is for people who have some kind nuked Blackberrys or receipt error message 507.

    Step 1: My problem initially was the destop Manager (DM) and the operating system (OS) that I tried to download.  Two of them that I found online from blackberry.com and ATT.com.  They were correct, but for some reason versions DM messed up during installation.  It looked OK, but as I had no idea of what it was supposed to look like at, I knew not the wisest.  This is what it looked like to me:

    Step 2: If it happened to you, RE INSTALL THE DTM!, do not UNINSTALL.  When reinstalling, it will ask you if you want to modify, repair or remove.  Click on repair and move forward.  This will install the file that was missing, for me it was software.msi of blackberry desktop.

    Step 3: Now install the OS of your provider

    Step 4: Do not open the DM!  Instead, click on start > my computer.  Click local disk > Program files > common files > Research In Motion > Apploader.  Then search for the file named "loader", there must be an icon phone little next to the name.

    Step 5: this will launch the application loader.  Remove the battery on the back of the phone.  Now plug the phone DIRECTLY into the USB port.  Don't use hubs or anything like that and make sure that you use the BACK USB ports, those are made for mass information.  Then click in the apploader, it will say "UNKNOWN USB" that's fine, just after...

    You will get a screen of control everything you want to download, go ahead and take your things, some you can't.  and then click Next.  It will give you a list of all you send to the BB.  Hit next and sit, make sure the computer will not sleep or Hibernate or screensaver for this can interrupt the download!   I did this and for some reason any upload took forever and I kept getting this screen:

    Encountered unknown error [J:0 x 00000005]

    I had no idea what to do.  I went out and bought a USB cable for cameras and MP3 players.   It was Belkin and make sure its GREAT SPEED!  I came home after MANY attempts with my other USB cable (motorola razr) and plugged it up, done what above, and it worked in 10 minutes, rebooted and back to factory settings.  I am so relieved that I wanted to put this up immediately.  I hope this helps you all!

  • next to the Start button on my computer that I don't have my pieces of information listed there now modzilla and internet explorer outlook express. How to get back the Please help, as I'm very new with computers, so I really need help

    I recently added some things and I've lost my things on the bottom of my screen modzilla, internet exployer and outlook express and I do not know how to get them back, I have not removed the programs that they are simply not on the screen when it is launched upward after the connection. Thank you

    Right click on the taskbar > toolbars > select Quick Launch bar Microsoft Security MVP, 2004-2010

  • Please help me to download the right software for my pc allows me to use a webcam!

    My pc hp laptop g56 129 wm is not allowing me to add a webcam, Bell and Howell Dv1200 HD. I downloaded the software provided with the camera to the PC and also, I went online and bought Driver Detective but the pc still says that there is no software to open the webcam! Help, please! Thank you!!!

    have you tried to install in compatibility mode?

    Click with the right button on the installer > properties > compatibility > chose the operating system

    http://Windows.Microsoft.com/en-us/Windows-Vista/make-older-programs-run-in-this-version-of-Windows?SignedIn=1

  • Please HELP!, when I start the installer for Adobe AE CS4, pops up a message that says: cannot install. Done, click Exit. Help, please! My OS is 32-bit. (Windows Ultimate)

    HELP me please!, Adobe AE CS4 gives me this error: cannot install. Done, click Exit.

    Check the configuration required on your system to see if your system is not enough.

    After Effects - http://helpx.adobe.com/after-effects/system-requirements.html

  • Please HELP: forms PDF, creating an average formula for text?

    Hello

    I really hope that somone can help. I can't find all the answers to my questions on the internet, google etc.

    First time using Acrobat. IM quick enough for learning about compters however formulas that my boss has asked me to do I don't know if they are possible.

    We have a report form, for exams, and each section that I need to calculate the average score for this section.

    There are 3 issues in the first section. There are drop down menus for distinction, merit and pass below collar to select for each question.

    Please see attached picture to show you what I mean.

    I want to be able to calculate the most selected/average selected dropdowns and don't count the award1 terrainpour na?

    The fields must be text and can not be numbers.

    Thus, for example, track 1 won an award, track 2 obtained a merit, track 3 got a distiction. all other fields left n/a

    Screen Shot 2013-10-10 at 12.15.12.png

    is there anyway to do this, so it is possible to exactly the same as above as checkboxes? s ' please see attached picture

    Screen Shot 2013-10-10 at 12.17.59.png

    I appriciate any help. I'm working on a mac

    Thank you

    Lauren

    Let's say that the box fields are called 'CheckBox 1' to "box 12". You must set their export value (under Properties - Options) to the value that they reprenset, and then you can use this script to calculate the average:

    var total = 0;

    var n = 0;

    for (var i = 1; i)<=12; i++)="">

    var v = this.getField("CheckBox"_+i).value;

    If (v! = 'Off') {}

    n ++ ;

    Total += Number (v);

    }

    }

    If (n == 0) {}

    Event.Value = "";
    } else event.value = total/n;

  • Please help trouble Code 43 error graphics card for XPS 8700 (as well as the disappearance of sleep/Standby Mode) (Windows 10)

    I got my XPS in 2014 and my warranty of service completed in 2015 Jan before I installed Windows 10. So since I've upgraded to Windows 10 I started having problems with by XPS 8700. Now, I have no guarantee. I thought he would go better once they have released an update of the BIOS and it did for a while unfortunately in recent months, I noticed two major issues.

    (1) upon the starting and restarting my computer, my monitor does not end up receiving the signal from the computer and remains dark.

    -Checking that it is not a problem with the monitor by testing with other computers

    -J' checked in the Device Manager and there was a next yellow alert for graphic cards / NVIDIA GeForce GT 635

    -By clicking on, he showed me this: Windows has stopped this device because it has reported problems. (Code 43)

    Unfortunately, it is not the only problem with the graphics card.

    (2) "sleep" my mode is gone (it is related to graphics and BIOS).

    -J' tried the go in power to add setting but it was not yet listed.

    -I went to the command prompt and looked powercfg.exe that's what I discovered:

    C:\Windows\System32>Powercfg - a

    The following sleep States are available on this system:

    Hibernate

    Quick start

    The following sleep States are not available on this system:

    Standby (S1)

    The system firmware does not support this standby state.

    An internal system component has disabled this standby state.

    Graphics

    Standby (S2)

    The system firmware does not support this standby state.

    An internal system component has disabled this standby state.

    Graphics

    Standby (S3) mode

    An internal system component has disabled this standby state.

    Graphics

    Eve (S0 low idle power)

    The system firmware does not support this standby state.

    Hybrid sleep

    Standby (S3) mode is not available.

    Now I really wish I could start or restart my pc without staring at a blank screen and the problem of code 43 with Nvidia GeForce GT 635. Also, I would if I could have the option to upgrade my PC to sleep. I really miss it and do not have to constantly reboot my computer to be able to see anything on the monitor.

    I hope someone can help me with these questions without having to reset the pc and reinstall, all over again, that the problem still exists in other cases (I don't have a copy of the installation of programs pre-installed dells so...). This computer is only 2 years old, it didn't need to be retired.

    NVIDIA GeForce GT 635 (PCI\VEN_10DE & DEV_1280) the card is physically wrong and needs to be replaced.

  • I have my product key (on my computer laptop back) but I don't have xp home edition cd please help... I am looking for the link to download...

    No custemer service on my area... so I need link to download

    There is no link to download. You need to contact the computer manufacturer that he provided.

  • Please help with the oracle text and select for each word in the sentence

    Hello

    I have a problem with a query which NEEDS to be done in SQL (not pl/sql in the stored procedure):

    Suppose that a phrase such as "Church of snowboarding."

    Can I divide this by using:
    Select regexp_substr ('church snowboard', ' [^] +', 1, level) word
    of the double
    connect regexp_substr ('church snowboard', ' [^] +', 1, level) is not NULL)

    now I have words 'showboard' and 'Church '.

    So far so good.

    Now I need for each of these words, to create a list of unique IDS collected using text oracle contains the query as follows: (pseudocode)
    for SPLIT.word in "snowboarding", "Church".
    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, SPLIT.word, 1) > 0
    UNION
    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, ' SYN('||)) SPLIT.word: ', GR_THESAURUS)', 1) > 0
    UNION
    SELECT 100 AS NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE NAME LIKE '% "| SPLIT.word | '%'

    so of course I have to untangle this UNION to remove duplicates

    Anyone here sees a way out of my situation? A way to make the loop in a select (use with and such) then
    Just add a select distinct NO_MATRC, NO_NOM_ from)

    I tried, but I'm out of ideas so I thought that some guru here might have the answer ;)

    Thanks in advance for any advice

    See you soon

    You might end up with something like the XML below, ideally as binding in the query.

    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, e
    Church of snowboard

    transform ((JETONS, "{", "}", "AND"))
    transform ((JETONS, "{", "}", "OR"))
    turn ((JETONS, «SYN (",", GR_THESAURUS) ', 'AND'))
    turn ((JETONS, «SYN (",", GR_THESAURUS) ', 'GOLD'))
    transform ((JETONS, «?)) {","} "," AND"))/seq >
    transform ((JETONS, «?)) {","} "," GOLD"))/seq >



    (1) > 0

  • I bought a new computer with Vista laptop Sunday I am suppose to get a free upgrade to Windows 7, but I don't know what to do. Please help me.

    I bought a new computer with Vista laptop Sunday I am suppose to get a free upgrade to Windows 7, but I don't know what to do. Please help me.

    Contact the manufacturer for instructions on registration, get your free update to Win7.

    PS: We deal with Windows Update here. For any question related to upgrading to and installing Win7, post here: http://social.answers.microsoft.com/Forums/en-US/w7install/threads ~ Robear Dyer (PA bear); MS MVP (that is to say, mail, security, Windows & Update Services) since 2002. DISCLAIMER: I do not represent nor don't work for Microsoft

  • HP mini 110 computer: Please HELP! Fatal error... system halted

    I put my laptop Hp mini for a while before JC, I got a new laptop and I took it out the other day to let my children to serve, and I don't know if I forgot the password or if there is something wrong with it? I typed the password that I remember 3 times and it gives me a message

    Password check failed

    Fatal error... system halted

    CNU90245QJ

    Please help me to recover my mini laptop for my children!

    TIA!

    @Sarita021432

    Enter: e9lo17vq5w (3rd character is a lowercase L)

    Kind regards

    DP - K

  • Memory is 90% please help

    Hi, my laptop is Inspiron 15R 5520. Memory is 90% how to reduce this second problem is that Safely Remove Hardware icon does not appear when I connect my mobile with a laptop. I try this command

    rundll32 shell32.dll,Control_RunDLL hotplug.dll
    

    but problem still is it so please help me.

    Hello

    Thanks for choosing Microsoft Community

    1st problem solving

    1. Clean up your drive
    2. all disk if possible, take 2-3 hours depending on the size of the fragments.
    3. check the virus. and update your operating system
    4. uninstall unnecessary programs
    5. Remove any antivirus, you can have (Norton, McAfee) and download Microsoft Security essential, much better results in low treatment.

    Process 2

    1. close all applications that run in the background, you can see in the lower right of the screen on the task bar. Just right click and stop their.
    2. Type "run" (without double inverted comma) in the start menu search box and open the runtime application. In this type "msconfig" (without double inverted comma) and a pop-up window then go to the "Startup" tab, and you will see some app that are checked in the left window.
    3. just uncheck all apps are waiting your AntiVir and apply and then click ok.
    4. after restarting your computer only antivirus will run and you use ram will be like 20%, what is optimal.

    2nd resolution of problems

    First open Service Manager and ensure that the Service of Support Bluetooth is running and set to automatic. Then open the Device Manager and open the disk properties box. Under policies, make sure that enable write caching on the disk is checked. It should work so effectively.

    Now right-click on USB dive (in my case hp USB device) and in the same place in the properties, change the default setting and select instead of better performance. See if that helps. Now, go to the quick delete new default setting

  • HP 15 laptop: I forgot BIOS password administration, please help

    I did a bios password when I first bought the laptop. I have problems with no found boot device and I don't remember the password of the bios. J9h21ca product number #aba. Serial number [personal information deleted]. Deactivation of the system number 6404905. I use the laptop for my work and I'm really stuck. I would like to reset all default settings to see if it solves the problem and me use my recovery disks. REC discs don't say no partion found. Restore to factory... Locked Windows. Please help with bios password. I tried for hours every password I used in the past for other materials. Ty so much

    Hello

    "The System disabled number 6404905" is an invalid number. Please check again and post back.

    Kind regards.

Maybe you are looking for