How to get the next character of a field of type varchar, based on logic?


Hello

I have a table with a column as data

PABSRCV
PERSONAL ADDRESS BOOKS
PABSXCV
PERSONAL ADDRESS BOOKS
PERSONAL ADDRESS BOOKS
PABSRCV
PABSCV
PBSCV
PABSCV
PABSCV
PABSRCV
PABSXCV

There are lakhs of lines with this type of data.
I know that there may be me 'R', 'X', 'Y', would be "or"C"just after ' (or there may be nothing after"). But I need to know what are the possible characters just after"

I wrote the query that will exclude 'R', 'X', 'Y', has "and 'C', but it does not give me possible characters that come just after a ' (except known as stated above)."

SELECT PASSED_DATA IN TAB1
WHERE PASSED_DATA LIKE '%S % '.
AND INSTR (PASSED_DATA, 'R') = 0
AND INSTR (PASSED_DATA, 'X') = 0
AND INSTR (PASSED_DATA, 'Y') = 0
AND INSTR(PASSED_DATA,'D') = 0

Can someone help me get all the possible characters that comes just after a ' excluding the already known characters as mentioned above?

My database is 10g

Maybe that's what you're looking for it. The following SQL give the separate list of character that comes after the first occurrence of S.

select distinct substr(passed_data, instr(passed_data, 's', 1, 1) + 1, 1) val
  from tab1;

Tags: Database

Similar Questions

  • How to get the game of ball of ink on Windows XP-based computer

    How to get the game of ball of ink on Windows XP based computer.

    Hello
    Also try this freeware site:
    http://www.bestvistadownloads.com/download-ink-ball-game-software.html
    B Eddie

  • How to get the values of page jspx (view layer) to the custom method defined in AM

    Hello

    I have 1 text field and 1 submit to homepage.jspx. When I click the button submit, it will call the custom method defined in the 'Module of the Application' java class (ApplicationModuleImpl.java). Can I know how to get the value of this text field in this custom method.

    I used the getter and setter method, however it didn't work as it is defining the value correctly, but get method returns null. Its not allowing to use FacesContext. Could someone please tell me how to get the value of the text field to this custom method (that is, using ADFContext,... something like that)

    Thanks in advance

    User,
    you have mixed up something here. Bean (as you did) cannot use the module of the application. They belong to different layers.
    I suggest you to look at some first tutorials (http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm) or watch the developer guide http://docs.oracle.com/cd/E16162_01/web.1112/e16182/toc.htm and take a look at some of the videos http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html

    Timo

  • How to get the element selected listfield and goto next page?

    Assalaamualikum

    I try parsing the XML from a url and show in listfield.

    problem:

    How to get the selected item and passing the variable and than goto next page?

    my code:

    package parsepack;

    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Vector;

    Import javax.microedition.io.Connector;
    Import javax.microedition.io.StreamConnection;

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.system.Display;
    Import net.rim.device.api.ui.DrawStyle;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Manager;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.ListField;
    Import net.rim.device.api.ui.component.ListFieldCallback;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.container.VerticalFieldManager;
    Import net.rim.device.api.xml.parsers.DocumentBuilder;
    Import net.rim.device.api.xml.parsers.DocumentBuilderFactory;

    to import org.W3C.DOM.document;
    Import org.w3c.dom.Node;
    Import org.w3c.dom.NodeList;

    extends xmlparsing public class UiApplication implements ListFieldCallback, FieldChangeListener
    {

    Public Shared Sub main (String [] args)
    {
    xmlparsing app = new xmlparsing();
    app.enterEventDispatcher ();
    }

    public long mycolor;
    Connection _connectionthread;
    private static ListField _list;
    private static Vector listElements is new Vector();.
    public display display = new MainScreen();
    MainManager VerticalFieldManager;
    VerticalFieldManager subManager;

    public xmlparsing()
    {
    Super();
    pushScreen (screen);

    final Bitmap Imagearriereplan = Bitmap.getBitmapResource ("blackbackground.png");

    mainManager = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR)
    {

    public void paint (Graphics graphics)
    {
    graphics.drawBitmap (0, 0, Display.getWidth (), Display.getHeight (), Imagearriereplan, 0, 0);

    Super.Paint (Graphics);
    }

    };

    subManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR)
    {
    protected void sublayout (int maxWidth, maxHeight int)
    {
    int displayWidth = Display.getWidth ();
    int displayHeight = Display.getHeight ();

    Super.sublayout (displayWidth, displayHeight);
    setExtent (displayWidth, displayHeight);
    }
    };

    Screen.Add (mainManager);

    _list = new ListField()

    {

    public void paint (Graphics graphics)

    {
    graphics.setColor ((int) mycolor);
    Super.Paint (Graphics);

    }

    };
    myColor = 0x00FFFFFF;
    _list. Invalidate();
    _list.setEmptyString ("* only supplies not available *", DrawStyle.HCENTER "");
    _list.setRowHeight (50);
    _list.setCallback (this);
    mainManager.add (subManager);
    listElements.removeAllElements ();
    _connectionthread = New Connection();
    _connectionthread. Start();
    }

    protected boolean navigationClick (int status, int time)
    {
    Try
    {
    Here, go to another screen if you need.

    }
    catch (System.Exception e)
    {
    System.out.println ("Exception:-: navigationClick()" + try ());
    }
    Returns true;
    }

    private class login extends thread
    {
    Public connection()
    {
    Super();
    }

    public void run() {}
    Doc document;
    StreamConnection conn = null;
    InputStream is = null;
    try {}

    Conn = Connector.open (StreamConnection) ("http://ec2-54-248-241-248.ap-northeast-1.compute.amazonaws.com/koperasi-akr-trial/cgi-bin/gw-pinjama...

    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance ();
    docBuilderFactory.setIgnoringElementContentWhitespace (true);
    docBuilderFactory.setCoalescing (true);
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
    docBuilder.isValidating ();
    is = conn.openInputStream ();
    doc = docBuilder.parse (is);
    doc.getDocumentElement () .normalize ();
    List of NodeList = doc.getElementsByTagName ("ID");
    for (int i = 0; i)< list.getlength();="" i++)="">
    Node node = list.item (i) .getFirstChild ();
    listElements.addElement (textNode.getNodeValue ());
    }
    } catch (Exception e) {}
    System.out.println (try ());
    } {Finally
    If (is! = null) {}
    try {is.close ();
    } catch (IOException ignored) {}
    } If (conn! = null) {}
    Try {conn.close () ;}
    catch (IOException ignored) {}
    }} UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    _list. SetSize (listElements.Size ());
    subManager.add (_list);
    Screen.Invalidate ();
    }
    });
    }

    }

    ' public void drawListRow (list ListField, Graphics g, int index, int y, int w)
    {
    Your string = (String) listElements.elementAt (index);
    int yPos = 0 + y;
    g.drawLine (0, yPos, w, yPos);
    g.drawText (, 5, 15 + y, 0, w);
    }

    public {get {Object (ListField list, int index)
    {
    Return listElements.elementAt (index);
    }
    public int indexOfList (String prefix, ListField list, int, string)
    {
    Return listElements.indexOf (prefix, string);
    }
    public int getPreferredWidth (ListField list)
    {
    Return Display.getWidth ();
    }
    public final void insert (String toInsert, int index) {}
    listElements.addElement (toInsert);
    }

    ' Public Sub fieldChanged (field field, int context) {}

    }
    }

    Thank you.

    I told you that replace the navigationclick() method where initialize you your listfield

    as I think that changing your code and then answer me

    _list = new ListField()
    {
    protected boolean navigationClick(int status, int time)
    {
      Dialog.inform("hi");
      return true;
    }
    
    public void paint(Graphics graphics)
    {
    graphics.setColor((int) mycolor);
    super.paint(graphics);
    }
    };
    
  • How to get the part of string before and after a character

    Hi all

    How to get the string before and after the comma character)

    Ex: The string contains the value John Kennedy

    I need the output as first stirng - John

    Second stirng - Kennedy

    Create table names (fullname varchar2 (20));

    insert into values of names ("John, Kennedy");

    insert into values of names ("papa ibra, Shan");

    insert into values of names ('Don Bosco'),

    Select * from names;

    Expected results

    FullName firstname lastname

    John, Kennedy John Kennedy

    Nicolas, Nicolas Shan Shan

    Don Bosco Don Bosco

    Please let me know how to proceed

    Thank you

    Hello

    This proves what I said before, on 0 and several commas commas.

    If we add these 3 rows to the sample data you posted:

    insert into names (fullname) values ("tou").

    insert into names (fullname) values (' David, Lloyd, George ");

    insert into names (fullname) values ('J, R, R, Tolkien");

    then the query I posted earlier produced these results:

    FULLNAME FIRSTNAME LASTNAME

    -------------------- -------------------- --------------------

    John, Kennedy John Kennedy

    Nicolas, Nicolas Shan Shan

    Don Bosco Don Bosco

    TOU tou

    David Lloyd, George David Lloyd, George

    J, R, R, Tolkien J R, R, Tolkien

    If you prefer to get these results:

    FULLNAME FIRSTNAME LASTNAME

    -------------------- -------------------- --------------------

    John, Kennedy John Kennedy

    Nicolas, Nicolas Shan Shan

    Don Bosco Don Bosco

    TOU tou

    David Lloyd, George David, Lloyd George

    J, R, R, J, R, R Tolkien Tolkien

    then you just change line 1:

    WITH got_commapos AS

    (

    SELECT FullName

    , INSTR (fullname, ','-1) AS commapos-* CHANGED *.

    Names

    )

    SELECT FullName

    , SUBSTR (fullname, commapos 1, -1) AS a first name

    SUBSTR (fullname, commapos + 1) in the FORM name

    OF got_commapos

    ;

  • How to get the value of a selected character unicode?

    Hi all

    How to get the value of a selected character unicode?

    The content property of a 'Character' InDesign object is a simple Unicode string. For access to the various characters is a basic javascript operation, and a google gives this as a good first result: http://www.w3schools.com/jsref/jsref_charCodeAt.asp

    Therefore, the value of a selected character unicode is

    App.Selection [0]. Characters [0].contents.charCodeAt (0)

  • Changes in Word, when I enter a character or letter, it deletes the next character

    original title: change in Word

    I was to edit a multiple page document.  So far, if I add or change a character, he just replaced what I typed.  All of a sudden, when I enter a character or letter, it deletes the next character.  I lose words or letters.  How to get back to editing without erasing it?

    Press ENTER on your keyboard.  See http://en.wikipedia.org/wiki/Insert_keyif you happen to have Word 2007 (or 2010) see http://help.lockergnome.com/office/Insert-key-work--ftopict1003194.html or http://www.technize.com/how-to-enable-insert-key-in-microsoft-word-2007-word-2010/

  • How to get the string (specified by row and column) of txt file with labview

    Hello world

    How to get the string (specified by row and column) of txt file with labview

    THX

    As far as I know, a text file has no column.  Be more specific.  Do you mean something like the 5th word on line 4, where the words are separated by a space, and lines are separated by a newline character?  You can read from the spreadsheet String function and set the delimiter to a space.  This will produce a 2D channels table.  Then use the table to index and give the line number and column number.

  • How to get the value of varStatus in managed Bean

    Hi all

    I use jDeveloper 11.1.2.4 version.

    I had a table with table with departments view object. I added an extra column to the table to display the serial numbers of the lines like this.

    < af:table...

    varStatus = 'vs' rowSelection = "multiple" id = "t1" binding = "#{ReferenceBeans.departmentTable}"> "

    < af:column id = "c5" headerText = "varStatus" >

    < af:outputText value = "#{vs.index + 1}" id = "ot1" binding = "#{ReferenceBeans.varStatus}" / > "

    at the bean, I get all the values of the selected line, but I don't get the varStatus value of the column.

    If I use

    Object varStatus is getVarStatus () .getValue ();.

    System.out.println("varstatus::"+varStatus);

    That's the impression first value only, but not the values of the selected line.

    varStatus.jpg

    How to get the varStatus value in the bean selected lines.

    Best regards

    Claude Reynier.

    You can get the index of the line of the ViewObject.getRangeIndexOf (row) method. Something like this:

    empIter.getViewObject () .getRangeIndexOf (currentRow)

    example:

        RowKeySet selectedEmps = getTable().getSelectedRowKeys();
        Iterator selectedEmpIter = selectedEmps.iterator();
        DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
        DCIteratorBinding empIter = bindings.findIteratorBinding("EmployeesView1Iterator");
        RowSetIterator empRSIter = empIter.getRowSetIterator();
        while (selectedEmpIter.hasNext())
        {
          Key key = (Key) ((List) selectedEmpIter.next()).get(0);
          Row currentRow = empRSIter.getRow(key);
          System.out.println("FirstName" + currentRow.getAttribute("FirstName") + "  - Row Index= " + (empIter.getViewObject().getRangeIndexOf(currentRow) + 1));
        }
    
  • How to get the text block, given anchor (~ a)

    I need to dynamically position anchored with anchor text blocks (but the relative position will be different for each anchor). If I grep ~ i can get the anchor marker - how to get the text block once I got this marker?

    Thank you

    The marker "anchor" is a character of "simple".

    So you can do the following if you have identified the character (and in this example selected it):

    //Start with an "Anchor Marker" selected:
    var myCharacter = app.selection[0];
    
    if (myCharacter.texts[0].textFrames.length == 1){
    
    var myAnchoredTextFrame = myCharacter.texts[0].textFrames[0];
        //do something with the anchored text frame:
        myAnchoredTextFrame.fillColor = "Yellow";
    
        };
    

    You can set the myCharacter variable differently, if you know the index of the character according to his history of parent.

    Or if you have found the character as part of a search GREP or TEXT by ExtendScript (JavaScript).

    Uwe

  • How to get the text formatting in the tables

    Dear experts and aid

    For my project, I import an RTF file and then read the data into 3 tables. It works fine when just using the contents of the string of paragraphs. However, the final script should be able to read and to replace the text formatted...
    Why use intermediate tables? Because otherwise I need to swap between two fm-documents (and you can be a part of the book).

    The imported file starts with a certain number of lines separated into two parts by a TAB ("designates a TAB in \x08 FM)
    [[Garneau, 1990 #12]]    »   [9]
    The good article can also be locally as text, e.g. [9]
    Then follow the same (or smaller) number of paragraphs with text formatted like this:
    [9]"D. Garneau, ed., National Language Support Reference Manual (national language Information Design Guide. Toronto, CDN: IBM National Language technical Centre, 1990.

    Is it possible to replace in the body of the function below the next song

      while(pgf.ObjectValid()) {
        pgfText = GetText (pgf, newDoc);
        gaBibliography.push(pgfText);
        pgf = pgf.NextPgfInFlow;
      }
    

    with this

      while(pgf.ObjectValid()) { 
        gaBibliography.push(pgf);
        pgf = pgf.NextPgfInFlow;
      }
    

    Do I need a special statement of the gaBibliography range?
    And how to get the right part of the lines as formatted intro thingy in table gaFmtCitsFmt ?

    Currently, I read in the tables as "strings" (function GetText not shown):

    var gaFmtCitsRaw  = [];                           // left column in processed RTF
    var gaFmtCitsFmt  = [];                           // right column in processed RTF
    var gaBibliography= [];                           // bibliography lines from processed RTF
    // filename is something like E:\_DDDprojects\FM+EN-escript\FM-testfiles\BibFM-collected-IEEE.rtf 
    
    function ReadFileRTF (fileName) {
      var nCits=0, nBib = 0, openParams, openReturnParams, newDoc, pgf, pgfText ;
      var TAB = String.fromCharCode(8);               // FM has wrong ASCI for TAB
      var parts = [];
      
      openParams = GetOpenDefaultParams();
      openReturnParams =  new PropVals();  
      newDoc = Open (fileName, openParams, openReturnParams);  
      pgf = newDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;  // get first pgf in flow
    
    // --- read the temp/formatted citations  
      while(pgf.ObjectValid()) {
        pgfText = GetText (pgf, newDoc);
        if (pgfText.substring (0,2) == "[[") {        // citation lines start with [[
          parts = pgfText.split(TAB);                 // get the two parts of the line
          gaFmtCitsRaw.push (parts[0]);               // Push the result onto the global array
          gaFmtCitsFmt.push (parts[1]);
          pgf = pgf.NextPgfInFlow;
        } else { break }
      }
    
    // --- read the bibliography
      while(pgf.ObjectValid()) {                      // until end of doc
        pgfText = GetText (pgf, newDoc);
        gaBibliography.push(pgfText);
        pgf = pgf.NextPgfInFlow;
      }
      newDoc.Close (Constants.FF_CLOSE_MODIFIED);
    } // --- end ReadFileRTF
    

    The following questions will then be how to change the script of FindAndReplace of Ian Proudfoot for managing text formatted as replacement. I will need to use the copy and paste IMHO...

    Klaus, okay, before pasting, you must assign the TextSelection object at your insertion point.

    // Add a new paragraph after the current paragraph.
    var newPgf = oDoc.NewSeriesPgf (lastPgf);
    var textRange = new TextRange (new TextLoc (newPgf, 0), new TextLoc (newPgf, 0));
    
    oDoc.TextSelection = textRange;
    oDoc.Paste ();
    

    -Rick

  • How to find the next date of the year and day as of today's date and the day

    I have a question about date functions, that is to say: how to get one next year (date and day) like today are the date and the day this year?

    You mean like this?

    SQL > select to_char (add_months (sysdate, 12),' day DD/MM/YYYY ') twice;

    TO_CHAR (ADD_MONTHS (S
    --------------------
    Friday, August 22, 2014

  • During the import of my camera or a file in Lightroom 5 my pictures are too exposed by 1-2 stops, while they are well exposed on the screen of the device. How to get the "right-exposed images on the screen?

    During the import of my camera or a file in Lightroom 5 my pictures are too exposed by 1-2 stops, while they are well exposed on the screen of the device. How to get the "right-exposed images on the screen?

    There is an option in your Lightroom preferences, under the general tab, "treat JPEG files next to raw in form of images". If you have this option is checked, then Lightroom will import and view your first two and JPEG files. You use the active D-lighting on your camera? If you are, you must disable this feature.

  • How to get the changes during the process of replicat ABENDED

    Hello
    I'm working on Oracle GG two-way DML replication. I m stuck in one place.

    My target replicat process has been ADDED due to the error:-ORA-01403: no data found. I restarted my process replicat again by runing the below command

    GGSCI (db1) 30 > replicat rep2 alter now
    GGSCI (db1) 30 > start replicat rep2

    After the reboot, the process to replicate that I do not see the changes on the target server which I had applied on the source for replicat target server was ABENED.
    My doubt is.

    1. is my command is correct for start replicat ABENDEND process?
    2. how to get the changes to the target server that applied to source for replication targer ABNDED?
    3. how to avoid the process of ABENDED replicat on the production server?
    4. how to follow the process in the production server ADDED?

    Please HELP:)

    Published by: Sabrina on August 29, 2012 03:32

    info from the GGSCI prompt will tell you the current file path and RBA.

    With this information, you can go in logdump and follow these steps:

    open 
    detail data on
    pos 
    n (next)
    

    It will appear the RBA # the next transaction. Then you return to the GGSCI prompt and do:

    ALTER EXTRBA
    BEGINNING

    With that he will take this next RBA from until you reach the following 1403

    Greetings,
    NACEUR

    PD: in the case where your question is answered please remember to mark your answers questions in order to clean up the forum and help others when they are looking for solutions to their problems.

  • How to get the desired TableCell element of TableView?

    Hello
    I implement an editable table view.
    I put the cell factory to generate editable cells in each column. Double click on any cell, the 'startEdit()' of my Tablecell method is called and a textfield appears.
    My current role is on the text box TAB, the next cell in the column of the row must be in editable form. (that is to say I have to call the method startEdit() of the next collection of the TableCell element).

    But I don't get how to get the element of the next column TableCell object.

    Can someone help me get this behavior. ? If there is also another way to get this feature please let me know. ?

    Here is the code I am trying to get with on the text field.
    textField.setOnKeyPressed(new EventHandler<KeyEvent>() {
                @Override public void handle(KeyEvent t) {
                    if (t.getCode() == KeyCode.TAB){
                         System.out.println("Focus on next column....");
                         //getTableRow().getAlignment();
                         //getIndex();
                         //getTableView().getItems().get(getTableRow().getIndex());
                         //TableCell cell = (TableCell)getTableRow().getChildrenUnmodifiable().get(1);
                         
                    }
                }
            });
    Thanks in advance.
    SAI

    Maybe, I'm not entirely understand your question, but could you not call tableView.edit (line, column) of your article and have this as the StartEdit method call for you?

    -Jonathan

Maybe you are looking for