Searching for a string in an array (complex) token value

Look at this example:

with tableA as

(

Select 1 nn, name of the 'HAND', sup 'GO','STE; VEP; URC; ELL, DAV; ID; FOX; FID; TIM; ALINE; IRON;' double modul

Union of all the

Select 143, 'GO', 'Development','DAV. ID; FOX; RON; GIL; BERT; FID; UC;' of the double

Union of all the

Select 476, 'FON', 'REST', "UC; DAV; "the double

Union of all the

Select 2685, "ELAB", "REN", "IDF;" the double

Union of all the

Select 2688, "REN", null, "RTM"; the double

)

,

tableB as

(

Select 'GOOG' soc, 'DAV' double modul

Union of all the

Select 'GOOG', 'ID' from dual

Union of all the

Select 'GOOG', 'FOX' of the double

Union of all the

Select "GOOG", "RTM" of the double

Union of all the

Select "APPL", "GIL' from dual

Union of all the

Select "APPL", "BERT" from dual

Union of all the

Select "APPL", "RON' from dual

)

Select * from tableA

/ * where at least a token in the field "modul" exist in (select modul in tableB where soc = "GOOG") * /.

connect name = sub

Start with nn = 2688

My goal is to find a way to determine if a token (value separated by ';') tableA.modul is present in the tableB.modul where soc = 'GOOG '.

The selection of tableA must be in this form, with the connection by.

Expected the result of the example above should be 3 drives (nn = 2688, nn = 143, nn = 1)

Solution 1: extensive use of regular expressions?

Solution 2: count the lines using intersect?

I did not...

Thank you!

Something like:

WITH tableA AS (SELECT 1 nn, NAME of the 'HAND', sub 'GO','STE;) VEP; URC; ELL, DAV; ID; FOX; FID; TIM; ALINE; IRON;' FROM dual modul

UNION ALL

SELECT 143, 'GO', 'DEVELOPMENT','DAV. ID; FOX; RON; GIL; BERT; FID; UC; "The DOUBLE

UNION ALL

SELECT 476, 'FON', 'REST', "UC; DAV; "The DOUBLE

UNION ALL

SELECT 2685, "ELAB", "REN", "IDF;" OF the double

UNION ALL

SELECT 2688, "REN", NULL, "RTM"; THE DOUBLE)

tableB AS (SELECT ' GOOG' soc, 'DAV' modul FROM dual

UNION ALL

SELECT 'GOOG', 'ID' FROM dual

UNION ALL

SELECT 'GOOG', 'FOX' OF the double

UNION ALL

SELECT "GOOG", "RTM" OF THE double

UNION ALL

SELECT "APPL", "GIL" OF THE double

UNION ALL

SELECT "APPL", "BERT" double

UNION ALL

SELECT "APPL", "RON" double)

SELECT *.

from tableA a

/ * where at least a token in the field "modul" exist in (select modul in tableB where soc = "GOOG") * /.

WHERE EXISTS (SELECT 'Found')

FROM tableB

WHERE the soc = 'GOOG '.

and instr (';' | a.Modul |) « ; », « ; » || Modul | ';') > 0)

connect name = sub

Start with nn = 2688;

HTH

Tags: Database

Similar Questions

  • Under XP I could search for a string in all the files on my computer. I can't find this search function of SMEs on Windows 7. Anyone?

    On Windows XP, there is a search function to search for a string in any kind of files on your computer. You are looking for a specific name was easy, if you fogort what kind of file, this name occurred in or what it was named.

    On Windows 7 it only allows searching for a name of a file.  How to search for strings in file names?  29/12/12 Paul Figueroa

    Oh, what you want is the content property.

    content: ~ = Figueroa

    [Update: apparently special search symbols such as ~ = do not work with the content when property indexed research places, but work during the search in unindexed locations.]

    I should mention that Windows 7 Search is not case sensitive, so it makes no difference to try to find upper or lower case letters.  In addition, Windows 7 Search is not able to search the contents of files that have no file extension.  There is also a weird question having to watch in Indexing Options to determine which file extensions are defined for content, research, where you have a type of unusual file that is not defined for the content of the search.

  • BY SPECIFYING THE NUMBER OF IDENTICAL CHARACTERS WHEN SEARCHING FOR A STRING

    Hey everybody,

    built-in indexOf() finds a character "." in the string "1.2.3." If value == 1.

    It looks nothing if the value == 0 or 2 or a number greater than 2.

    var txt:String = '1.2.3.';

    var: output string = String (this);


    If (txt.indexOf(".") == 1)

    {

    trace (output);     [object MainTimeline]

    }

    The must be a simple method to specify the number of characters "." When you search for the string "1.2.3.".

    For example, if there are 2 characters "." in the string "1.2.", then run it through a statement but if contains no 2 characters "." then do nothing.

    There is a built-in function called contains , but it is mainly used in XML.

    indexOf() resembles codes javascript unstable, one of these framework which unixers hatred.

    You don't have to use regular expressions to determine how many points is in the string. Use of split and read the length:

    var txt:String = '1.2.3.';

    trace (txt. Split("."). (length);

  • Search for data in a 2d array and trigger a signal when it is recognized

    Hi, I'm looking for an interactive way to find data in a table that contains a 2d array in a cluster. Data in table 2d. I have attached the vi containing the table. I want an interactive method to search for the codes of the 2d table (found in the 1st row) and once found a signal to say it was found. The signal varies in what category data code has been found (if engineering, law or other). BTW the I'm looking are in fact data entry using a barcode reader. Use a table 1 d search function? or is there another method?

    Just to make sure that we are clear here.  We try to find the cluster that contains a point of data in the first row of the table 2D?

  • Search for a string

    I have 200 xml files stored in my PC. I want to search for a particular string in these XMLs, and list the name.
    Can I do this using SQL or PL/SQL?

    I'm on 11 GR 2.

    I don't know what you are looking for. example of

    C:\Temp>type emp.xml
    
    hugo
    
    C:\Temp>findstr /i /m "hugo" *.xml
    emp.xml
    
    C:\Temp>
    
  • How to search for a string in the order reversed through REGEXP_INSTR

    Hi all

    I have the SQL query in which I want to get the first position of the occurrence of the end of the string

    for example:
    String:NBANK-ASD-00-1001-525-1002
    Condition: the position of the character '-' the last. (Note: character can also be '-' or ' / ')
    output: 1002

    for above condition, I have a request next return


    SELECT SUBSTR('NBANK-ASD-00-1001-525-1002',REGEXP_INSTR('NBANK-ASD-00-1001-525-1002','[^-/]',1),LENGTH('NBANK-ASD-00-1001-525-1002 ')) FROM dual;



    but I'm getting more results

    NBANK-ASD-00-1001-525-1002
    means that the expression returns 0...

    pls help me solve this problem.

    You can change your query as follows

     SELECT SUBSTR('NBANK-ASD-00-1001-525-1002'
       , REGEXP_INSTR('NBANK-ASD-00-1001-525-1002', '[^-/]*$', 1)
       , LENGTH('NBANK-ASD-00-1001-525-1002'))
       FROM dual;
    ;
    

    but you can just use REGEXP_SUBSTR to get the same result...

     SELECT REGEXP_SUBSTR('NBANK-ASD-00-1001-525-1002', '[^-/]*$', 1)
       FROM dual;
    ;
    

    Kind regards
    Bob

  • The search for exact strings (and the right formula)

    I am using FIND instruction to search multiple strings in a larger formula. The original formula that I do stand out is the following:

    = IF (ISNUMBER (FIND ('INC', A1)),' ', 'Y')

    Of course, this gives a Y if he finds some text in "". "" However, I have several channels for which I would check, and they need to be exact. That is to say when I search Inc. and Inc., I don't want Inc. to be counted. So, I tried the following formulas.

    = IF (ISNUMBER (FIND (OR("INC",inc"), A1)),' ', 'Y')

    = IF (SUM (COUNTIF (A1, "* INC. *","{* Inc. *}")),' ',' Y')

    The second works better, but it also counts Inc. as a football game. Any suggestions?

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Search for the string in the string table and see the following value in the line

    Hi, I'm new I have LV and I do a Vi that read worksheet values and generates 2d channels of the same spreadsheet table. For the moment everything I need is a function that find specyfic string in this table and show the next value in a line. As:

    Table:

    a; b
    c; d
    f; g

    example: find the 'c '.

    VI shoud show "d".

    Concerning

    Not a bad homework problem.  Do it with pencil and paper.  Write your table and pretend you're the computer.  What you want to do (step by step)?  What questions do you have?

    Now that the translation a bit to computers.  You mentioned that the data is in an array of strings.  What structures (LabVIEW) work with tables?  [Do you know how to work with tables?  [Otherwise, review some of LabVIEW Tutorial material - see top right of the first page of the Forum].  What do you know about channels?  What questions you need to ask questions on the channels?  What do you know about string functions?

    Watch these things in some LabVIEW code, 'feed' some data and see what he does.  If it seems to do things "unexplained", you can try to look at the block diagram to run by turning the performance highlight (and if you don't know what that means, use the help of LabVIEW and see the tutorials).

    Bob Schor

  • Using Regex to search for a string

    East - viable to use regular expressions with search "Specific tag" (i.e.script) "with the attribute" (i.e. the CBC) and '=' a regex string rather than a precise search term?  Find / Replace tool seems to prevent a generic find simple (i.e. ' searchter * for searchterm ") any idea would be appreciated.

    Screen shot 2012-01-27 at 3.55.27 PM.png

    uneAaron wrote:

    I'm trying to replace a source value of script for all instances where the value contains the string "/ bbcswebdav/xid-144702_1", where the string '-xid' is followed by a different numeric value in each case.

    The regular expression to find this string is:

    \/bbcswebdav\/xid\-[\d_]+
    

    The numeric value contains an underscore, so the last section ([\d_]+) uses a range that selects one or more numbers or underscores.

    Perhaps as important as the identification of what you want to find is to specify how you want to replace it. Regexes can capture groups that can be used in the field replace to simplify things.

  • GREP to search for the string of quotes

    I have some strange "strings" of quotes that I need to look where there are single quotes and double row with nothing between them. So ' ' ' ' wording here. ' " "" "Here. »

    GREP lets you search a string of quotes that could consist of a number or combination of single and double quotes? The chain would consist of all open citations or nearby, but could be any combination of double and single, beginning or ending with simple or double.

    Thank you

    Ken

    SRiegel wrote:

    ['"]+

    (it's a single and double quotes inside the square brackets) If you do this with typographical quotes turned on [..]

    As for the finding , there is no need to toggle the quotes or disable. For example, a single ' will find all three variants, while ~ [will match only open loop, ~] closed curly, and ~' those just right.

    Other than that, Yes, you want to make sure that even when curly quote is active for replacements.

  • Searches for a string in a pdf BLOB

    Hello

    My requirement is to find a string in the data blob. I use
    DBMS_LOB. INSTR (FILE_DATA, utl_raw.cast_to_raw ('Tag Switch'), 1, 1) approach > 0.
    It does not work for doc htm, text formats. But when we try to search in pdf blobs, it does not work.

    Can anyone suggest a solution for this problem?

    You can use Oracle Text for your search words in pdf files.

    SQL> SELECT * FROM v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    
    SQL> /* Creating my demo table */
    SQL> CREATE TABLE pdm(id_pk INTEGER,fname VARCHAR2(30),pdf_file BLOB);
    
    Table created.
    
    SQL> /* Creating the directory object for latter use */
    SQL> CREATE OR REPLACE DIRECTORY TEMP AS 'c:\';
    
    Directory created.
    
    SQL> /* Creating a procedure which will load the BLOBs (pdf files) into the table */
    SQL> CREATE OR REPLACE PROCEDURE load_file(pi_id IN INTEGER, pfname IN VARCHAR2) IS
      2    src_file BFILE;
      3    dst_file BLOB;
      4    lgh_file BINARY_INTEGER;
      5  BEGIN
      6    src_file := bfilename('TEMP', pfname);
      7
      8    INSERT INTO pdm
      9      (id_pk, fname, pdf_file)
     10    VALUES
     11      (pi_id, pfname, EMPTY_BLOB())
     12    RETURNING pdf_file INTO dst_file;
     13
     14    DBMS_LOB.OPEN(src_file, dbms_lob.file_readonly);
     15    lgh_file := dbms_lob.getlength(src_file);
     16    DBMS_LOB.LOADFROMFILE(dst_file, src_file, lgh_file);
     17    dbms_lob.close(src_file);
     18    COMMIT;
     19  END load_file;
     20  /
    
    Procedure created.
    
    SQL> EXECUTE load_file(1,'plsql_new_in_11gr1.pdf');
    
    PL/SQL procedure successfully completed.
    
    SQL> EXECUTE load_file(2,'Model clause.pdf');
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> SELECT id_pk,fname,DBMS_LOB.getlength(pdf_file)
      2  FROM pdm;
    
         ID_PK FNAME                          DBMS_LOB.GETLENGTH(PDF_FILE)
    ---------- ------------------------------ ----------------------------
             1 plsql_new_in_11gr1.pdf                               170264
             2 Model clause.pdf                                    4288164
    
    SQL> /* Creating the index */
    SQL> CREATE INDEX pdm_pdf_idx ON pdm(pdf_file) INDEXTYPE IS CTXSYS.CONTEXT;
    
    Index created.
    
    SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS(USER, 'PDM', cascade=>TRUE);
    
    PL/SQL procedure successfully completed.
    
    SQL> SELECT id_pk,fname
      2  FROM pdm
      3  WHERE CONTAINS(pdf_file,'PL/SQL')>0;
    
         ID_PK FNAME
    ---------- ------------------------------
             1 plsql_new_in_11gr1.pdf
    
    SQL> SELECT id_pk,fname
      2  FROM pdm
      3  WHERE CONTAINS(pdf_file,'Fine-grained access control')>0;
    
         ID_PK FNAME
    ---------- ------------------------------
             1 plsql_new_in_11gr1.pdf
    
    SQL> SELECT id_pk,fname,DBMS_LOB.getlength(pdf_file)
      2  FROM pdm;
    
         ID_PK FNAME                          DBMS_LOB.GETLENGTH(PDF_FILE)
    ---------- ------------------------------ ----------------------------
             1 plsql_new_in_11gr1.pdf                               170264
             2 Model clause.pdf                                    4288164
    
    SQL> SELECT id_pk,fname
      2  FROM pdm
      3  WHERE CONTAINS(pdf_file,'Saubhik')>0;
    
    no rows selected
    
    SQL> EXECUTE load_file(3,'plsql_conditional_compilation.pdf');
    BEGIN load_file(3,'plsql_conditional_compilation.pdf'); END;
    
    *
    ERROR at line 1:
    ORA-12899: value too large for column "SCOTT"."PDM"."FNAME" (actual: 33,
    maximum: 30)
    ORA-06512: at "SCOTT.LOAD_FILE", line 8
    ORA-06512: at line 1
    
    SQL> EXECUTE load_file(3,'conditional_compilation.pdf');
    
    PL/SQL procedure successfully completed.
    
    SQL> SELECT id_pk,fname,DBMS_LOB.getlength(pdf_file)
      2  FROM pdm;
    
         ID_PK FNAME                          DBMS_LOB.GETLENGTH(PDF_FILE)
    ---------- ------------------------------ ----------------------------
             1 plsql_new_in_11gr1.pdf                               170264
             2 Model clause.pdf                                    4288164
             3 conditional_compilation.pdf                          540594
    
    SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS(USER, 'PDM', cascade=>TRUE);
    
    PL/SQL procedure successfully completed.
    
    SQL> SELECT id_pk,fname
      2  FROM pdm
      3  WHERE CONTAINS(pdf_file,'conditional')>0;
    
         ID_PK FNAME
    ---------- ------------------------------
             1 plsql_new_in_11gr1.pdf
             3 conditional_compilation.pdf
    
    SQL> SELECT id_pk,fname
      2  FROM pdm
      3  WHERE CONTAINS(pdf_file,'The Catch 22')>0;
    
         ID_PK FNAME
    ---------- ------------------------------
             3 conditional_compilation.pdf
    
    SQL> 
    
  • How can I change the registry values with a common search for the string and replace the function where I don't do all manually?

    Due to problems of space with my installation of XP Pro, (operating system has been installed on a 4 GB partition and I did have a copy of the OS to do a new installation) I am trying to move a number of files on a mounted drive.

    It is a way to search an entire record of [SPECIFY FOLDER] "C:\Program Files\" instances and replace each with "C:\Program Files\Overflow\ [SPECIFY FOLDER]" as a common discovery replace function?

    Also, I'll have to move several "Common Files" files in the mounted folder 'Overflow '. The method to make learning one should help me to do both. Manually, it will take most of thousand years that all the files in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components
    the files seem to have a key value have changed.

    I have already uninstalled and reinstalled some programs at the desired location, but many still use the "Common files" folder despite my having already changed the default installation directory path in the registry. Any help would be appreciated.

    Thank you

    NORTH CAROLINA

    One way:

    1. Start Regedit (start-> Run-> 'Regedit')
    2. Select the branch of the registry, or you are interested in changing.
    3. The export of this branch of the registry (file-> export) in a ".reg" file
    4. Use a programming editor (for example, the freeware Notepad ++) and use the "Find and replace" function to make the changes you want.  Save the modified file.
    5. After making the changes, double-click the .reg file to fold changes in your registry.

    As always, keep a backup of your original registry in case things get really bad and know how to do to restore this backup your machine should not be able to start.

    Notepad ++: <> http://notepad-plus-plus.org/ >

    HTH,
    JW

  • Search for the strings "BOLD" and apply XML tags that already, I created manually...

    Dear friends,

    I want to string (strings that are "BOLD") the search of my document textframe and ask xmltags who... I worked with the codes below... But it doesn't quite work...  (b "BOLD" tag with a color label)

    docObj = app.activeDocument;

    xmlObj = docObj.xmlTags;

    app.findTextPreferences = app.changeTextPreferences = null;

    app.findTextPreferences.findWhat = '(.+)';

    app.findTextPreferences.fontStyle = "Bold";

    app.changeTextPreferences.changeTo = docObj.xmlImportMaps.xmlObj.tags.item(name:b);

    docObj.mapXMLTagsToStyles ();

    Thank you and best regards,

    Vel.

    Finally, I got the correct codes after no. attempts, I tried...

    Here is the code:

    docObj = app.activeDocument;

    xmlObj = docObj.xmlTags;

    pageObj = docObj.pages.item (0);

    myTextFrame = pageObj.textFrames.item (0);

    myText = myTextFrame.parentStory.paragraphs.item (0);

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

    app.findTextPreferences.fontStyle = "Bold";

    xmlObj = app.changeTextPreferences.markupTag [0] .name;

    Alert (App.changeTextPreferences.markupTag);

    app.activeDocument.changeText ();

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

    app.findTextPreferences.fontStyle = "Bold Italic";

    xmlObj = app.changeTextPreferences.markupTag [1] .name;

    Alert (App.changeTextPreferences.markupTag);

    app.activeDocument.changeText ();

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

    app.findTextPreferences.fontStyle = "italic";

    xmlObj = app.changeTextPreferences.markupTag [2] .name;

    Alert (App.changeTextPreferences.markupTag);

    app.activeDocument.changeText ();

    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.capitalization = Capitalization.SMALL_CAPS;

    app.changeGrepPreferences.markupTag = xmlObj [4] .name;

    Alert (App.changeGrepPreferences.markupTag);

    app.activeDocument.changeGrep ();

    Thank you

    Vel...

  • Searches for a string of accented characters

    Hi all

    I have a db Oracle 9.2. There is a CUSTOMER table with a column called name. The database character set is WE8ISO8859P1. There are 35 million records in the CUSTOMER table, a small minority which have been seized, including accented characters, for example in the field of FAMILY name like o.

    I need to determine exactly how many lines contain accented characters and report on them. The majority of the lines do not have accented characters. I need a query that SELECTS only lines whose field NAME contains accented characters. In English, the request to declare these lines would be something like:

    SELECT THE LAST NAME OF THE CUSTOMER WHOSE NAME CONTAINS AT LEAST AN ACCENTED CHARACTER;

    or expressed differently in


    SELECT CUSTOMER NAME WHERE NAME CONTAINS at LEAST ONE CHARACTER < an or > z and < has or > Z;

    My string manipulation abilities are not very strong, and I would be grateful if someone could help

    I need a query that SELECTS only lines whose field NAME contains accented characters.

    SELECT SURNAME FROM CUSTOMER WHERE SURNAME != convert(SURNAME,'us7ascii')
    
  • Search for a string using "Game Plan" or "Regular Expression to Match."

    Hello

    I would use the 'game plan' or the vi "Expression regular game" simply because the products that provide these vi. The result that interests me is the substring 'after '. I want to be able to specify a "substring" and get everything after the substring of the input string. However, I'm getting all confused and/or watered upward when it comes to "regular expressions". Is there a way to create a "regular expression" which acts as a 'substring' to find within the input string?

    The substring is a path of partial directory that contains a colon, backslashes, etc. which are part of a directory path.  If some how the "regular expression" entry must ingnore all special characters and simply to understand if the substring in the string entry and give me 'all things' after the substring in the output of 'after the string.

    Use Regular Expression Match instead of match pattern; It's better.

Maybe you are looking for

  • HP ENVY Phoenix 810-330qe CTO: adding hard drive for hp envy phoenix 810-330qe

    I bought a 3.5-inch drive, but it seems not to fit.  Can you please tell me what I neet to buy for the size and all the other elements that are required to install a second drive? The SSD that comes with the machine is 2.5 inches, is in a rack and ha

  • Student discount

    Hello I wanted to ask if HP gives student discounts on their laptops. I know other companies do, but not HP?

  • problem the printer connection

    After having my computer reinstalled, I can't have my printer photosmart work 6510I don't really know to much about computers. can you please help...Thank you peter West

  • M58 series via LAN (GROUND Intel) driver

    After RIS'ing a client with windows XP, I had to update some devices in the device with the correct drivers Manager. But after all downloads for my 7360AEG M58, I'll still have an unknown device "PCI Serial Controller." After Google search, I found t

  • Windows Defender does not work: encounteredan error: 0x800705b4

    I can't activated the windows Defender. I get this message: Windows Defender does not work: encounteredan error: 0x800705b4. This operation returned because the time limit has expired.