Verification of an element in one string from another string

Hi guru,.

I have 2 strings separated by commas. Say it like that.

a VARCHAR2 (100): = '1,2,3,4,5,6,7,8,9,10';
b VARCHAR2 (100): = '2,6,9';

My requirement is like I want to check the chain has, if it has all of the b element. I am using the regular expression. But I wasn't able to do.
Kindly help me.

Kind regards
VJ

Hello

I'd probably use the Michaels, but if you want to see how you could do this using regular expressions:

SELECT     *
FROM     table_x
WHERE     REGEXP_LIKE ( ',' || a || ','     || '/' ||
                ',' || b || ','
              , '(,[^,]+,).*/.*\1'
              )
;

where "/" is known not either a or b.

Tags: Database

Similar Questions

  • FRM-92101 happens when I open one form from another and then close it.

    FRM-92101 happens when I open one form from another, check something, display a message to the user and exit the screen to the previous shape.

    Version of forms: 10.1.2.0.2. Java: 1.6.0_23. Browser: IE6

    When I put forward two messages of 'EXIT_FORM', all right and the second form is closed again to the first shape just like I wanted.
    In 9.0 forms, it did not.

    It has to do with the fact that I use JRE instead of JInitiator?
    Thank you.

    Take a look by using the built-in NAME_IN forms. You will find the NAME_IN function takes a STRING as parameter. Change your code to:

    IF NAME_IN('SYSTEM.CURSOR_ITEM') IS NOT NULL THEN
       SYNCHRONIZE;
    END IF;
    

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • Populating one table from another table

    Hi Forum...

    I'm trying to populate a table from another table using CFQUERY... I have no problem with the selection of data from the original table, but need help to get the data into the new table. I use MX 6.1 and access as the database server.
    The two arrays have domain names identical to the same place, and I don't want to have to code all the column names in the selection and insert command. for example

    < cfquery name = "GetData" datasource = 'somename' >
    SELECT * FROM AssetTable1 WHERE BarCode = "123456".
    < / cfquery >

    < cfloop query = "GetData" >
    < cfquery name = "InsData" datasource = 'somename' >
    INSERT INTO AssetTable2 (xxxx...)
    VALUES ("#xxxx... #'")
    < / cfquery >
    < / cfloop >

    I hope this makes sense

    Thanks in advance

    Dave

    If your tables are identical structures and their columns are of the same type and position, and both tables are in the same database, then put everything in a single query.


    INSERT INTO AssetTable2
    SELECT *.
    OF AssetTable1
    WHERE bar code = "123456".

    If the columns were in different positions, then you should be listed explicitly in the INSERT and SELECT the parts, but you get the idea.

    INSERT INTO table1 (col1, col2)
    SELECT col1, col2
    FROM table2
    WHERE all that...

    Phil

  • How to refactor (move) an element of one application to another module

    Hi all
    I have all the components of the business in one module of the application.
    Now, I want to have a nested application (NestedAM) under the RootAM module. I created, and finally, I want to move some components from the RootAM to the NestedAM.
    How can I do?

    I searched the forum, but I don't the have not found.

    Thank you

    Hello

    In your RootAM.xml tab data, you must exclude the elements that you want to move to NestedAM and include them in the tab NestedAM.xml data model

    Hope this helps

    Joseba

  • Simple enough, but calling one method from another class

    Hi all
    I know it's pretty simple, even though I do not see where I am going wrong for some reason any. Basically, I have a class that extends JPanel but when I try to call one of its methods in my main class I get an error. The code (I hope) is:

    Main.Java
    import java.awt.BorderLayout;
    // ...
    import javax.swing.UIManager;
    
    public class Main extends JFrame implements ActionListener {
    
         JFrame frame;
         public static JPanel statusBar;
    
         public Main() {
    
              // ...
    
              // Add a status bar
              statusBar = new StatusBar();
              mainPanel.add( statusBar, BorderLayout.SOUTH );
    
              setContentPane( mainPanel );
              // ...
         }
    
         // ...
    
         public static void setStatusBarText( String s ) {
              statusBar.setStatusText("Test");
         }
    
         // ...
    }
    StatusBar.java
    import java.awt.Color;
    // ...
    import javax.swing.SwingConstants;
    
    public class StatusBar extends JPanel {
    
         private int barWidth;
         private static JLabel status;
    
         public StatusBar() {
              super();
              //barWidth = Main.getProgramWidth();
              //setPreferredSize( new Dimension(barWidth,22) );
              setLayout( new FlowLayout( FlowLayout.LEADING ) );
              setBorder( BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(160,160,160) ) );
    
              status = new JLabel("Test", SwingConstants.LEFT);
              //status.setVerticalAlignment( SwingConstants.CENTER );
              add( status );
         }
    
         protected void setStatusText( String s ) {
              status.setText( s );
              revalidate();
         }
    }
    The "statusBar.setStatusText ("Test")"; call in the main class file does not work and I get the error:

    >
    cannot find symbol
    symbol: setStatusText (java.lang.String) method
    Location: class javax.swing.JPanel
    statusBar.setStatusText ("Test");
    >

    Any ideas what I am doing wrong? I created an instance of the class called status bar StatusBar, can I use it to call the setStatusText() method (via statusBar.setStatusText ()) I thought everything is OK, then it does not work? Even if there is an easier way to do what I want to achieve (i.e. to update a JLabel since the 'central' main class file instead of setting the JLabel static and have all classes call him directly), I'd be glad to know where I am going wrong here nevertheless.

    Thank you very much
    Tristan
         public static JPanel statusBar;
    
         public static void setStatusBarText( String s ) {
              statusBar.setStatusText("Test");
         }
    

    >
    cannot find symbol
    symbol: setStatusText (java.lang.String) method
    Location: class javax.swing.JPanel
    statusBar.setStatusText ("Test");
    >

    The type of variable statusBar is JPanel. That's all the compiler takes into account. It is not relevant that at a certain point in the program, the type of the object pointed to by this variable is a subclass of JPanel (because at another time, it might be an instance of another subclass or JPanel itself.

  • How to make one file from another user on my laptop account?

    I have a file that I backed up on my laptop but didn't know it was on my son's user account, now I don't know how to transfer them to my user account... Help

    Hello

    Logon as ADMIN, then you can access all the areas of your computer. Then copy the file to a place
    on your account such as the C:\Users\Your user documents. Once copied, then you can remove it from
    the other account.

    I hope this helps.

  • How to update one column from another table

    Hello

    We have some sellers who are defined as employees but without employee_id for some reason any.  So I would like to update the correct number of a view of HR records.  Here is what I tried:

    update of po.po_vendors x

    Define employee_id = (select apps.per_people_v7 person_id y)

    where y.first_name |' '|| y.last_name = x.vendor_name)

    Error received: a row subquery returns more than one line.

    If I use this instruction to check, I'm correct employee_id or person_id home:

    Select apps.per_people_v7 person_id y, po.po_vendors x

    where y.first_name |' '|| y.last_name = x.vendor_name

    When I checked/compared with some old posts here, I could not just see where I did mistake.  Please notify.

    Thank you

    Ning

    Because for the same vendor id, you have a (employee id) id of the person twice in the target table. As Boneist said "fix data, difficulty of the request, fix the requirement...". »

    How many sellers are there in your target table?

  • to add records to one table from another

    Hello gurus

    I have a table in which I have a few files... now, I want to add in the documents of table A of another table B has the same structure and columns.

    Y at - it a command for it
    insert into A
    select * from B;
    
  • How to update one table from another table

    Hello

    I have two tables, t1 or t2, I wrote the below query, but got an error as ORA-00904 ' identifier Inavlid b.purchase_capturedate. The query is:

    Update t1 a
    Set a.docdate = b.purchase_capturedate
    where (a.docid))
    Select docid_request from t2 b where a.docid = b.docid_request and b.itemcategoryid = 6)



    Help, please.


    Kind regards

    Hello

    describe your tables t1 and t2

    Concerning
    Sankar MN

  • Y at - it a tutorial for use in 2015 PSCC aware content to replace an element in one photo for another?

    I want to exchange a picture of family where a person has with his eyes closed, but in another of the same type, they do not. I want to be able to select or use "content aware" to do this. I made a tutorial somewhere on this site that shows exactly that, but now I can't find it. : ()

    Help!

    Thank you

    Dede

    PS all the tutorials I've seen so far shows that deletion of an object.

    Hi Denis,.

    Please follow the link for the tutorial on the patch below content aware tool and move the tool.

    Moving and Patch content-Aware

    Hope this helps

    ~ UL

  • How to stop one timer from another class?

    I am trying to stop a timer in the stopwatch class MainMenu class. But my code does not work, here is my code:

    in the class MainMenu I have method:

    public function pauseGame (e:MouseEvent){

         timestop = new Stopwatch();

         timestop.Stoptimer(); }

    in the Stopwatch class, I'm trying to stop my timer with:

    public function Stoptimer(){

          timer.stop();

          timer.removeEventListener(TimerEvent.TIMER, timeFun);

          return; }

    You pass a reference to the timer to the Stoptimer class.

  • How to call a method of one class from another class?

    I have two classes, Class1 and Class2 are saying. They are both public. They are located in the same package, and both are important to each other.

    I am trying to call a 2 function in Class1, but I do not know the syntax.

    I tried:

    Class2.godoThisThingNow ();

    But it gave me an error 1061, call to a method not defined.

    What is the correct syntax for this, and it is even possible in AS3?

    Thank you!

    You can call a public in Class1 2 method IF Class2 has access to an instance/member of Class1.

    for example, in Class2:

    var c1:Class1;

    .

    .

    C1 = new Class1();

    .

    .

    .

    C1.somepublicMethod ();

  • Sending data from one component to another

    I want to send data from one component to another.

    Both are on the page of Main.mxml

    What is the best way to do it (without going into a frame)

    Who send data up to the main.msml via an event then complex treatment of vars public and pick up in the second pane, but is it possible to go straight?

    Thank you

    Dan

    Once the element keeps one reference to another. Or you set it to a global var shared by two components.

    C

  • Copy and paste multiple layers (with objects) of one movieclip to another

    Hey guys,.

    I'm really frustrated with myself because I believe that this should be easy.

    But I was stuck for centuries, hopefully you guys could help out me.

    I try to copy the images of 6 different layers and objects (action script, own movements tween, buttons, graphic elements) of one movieclip to another. But as soon as I did this, everyhting seems to have shifted and if I try to reposition elements in the new clip, it seems that I must repeat after each keyframe for each layer.

    So my question is

    Is a. possible to duplicate a clip, but give it an instance name (a completely new movieclip with the same frames and layers in the same position as the previous)?

    B. How can I move multiple objects through the layers and keyframes?

    I hope that makes sense.

    Thanks in advance for your help.

    M.

    A. you can create a movieclip instances just by dragging the movieclip on the stage and with actionscript library (if the movieclip is exported for actionscript).  all instances of movieclips created in this way will be identical.

    You can also right-click on a clip from the library and click on duplicate movieclip and then change the duplicated movieclip.  instances created of the split movieclip and original movieclip can be different.

    B. I do not understand your question.  I understand (I think) your problem.  to copy specific layers/frames, just shift-mousedown and drag through all layers and images you need.  Don't be shy on the inclusion of the layers and or framework you can remove the latter.  then paste it in a new movieclip.  remove the layers that you don't want.  If you remove all executives of other layers, you must remove the frame of all layers or you will have problems as you described.

  • How to animate an element from one point to another with Create.js?

    Hello

    I want just to animate an element from one point to another.

    But the components are moving and animation, which is not much help.

    I saw this code on the page of create.js - createjs. TweenJS.get (Logo) .to ({x: 500}, 1000)

    But I can't seem to do anything to my instance of Logo.

    Any help would be appreciated!

    Kind regards and thanks in advance.

    This should be:

    createjs. Tween.get (this.) Logo) .to ({x: 500}, 1000)

Maybe you are looking for