How to find the location of the apostrophe in a string by using func instr

I have a string ' 345634 ', ' 234' (single quotes 4 all are part of the chain) and I want to find the location of the 3rd single quote using the instr function, could quickly sum1 please help me.

Concerning
Rahul

Published by: Rahul Kalra on August 26, 2010 08:58

You must use a double apostrophe to denote an apostrophe in a literal string in SQL

If ' "' is a single quote.

Knowing that, it is what you need:

SQL>  select instr('''345634'',''234''', '''', 3) pos_of_3rd_quote from dual;

POS_OF_3RD_QUOTE
----------------
               8

Tags: Database

Similar Questions

  • How to find the bytes in hexadecimal string start

    Hi, I'm a freshman for Labview.

    I want to find the beginning bytes in Hex string. For example, 12 1A 00 34 1A 01 23... How can I get my data of 3 bytes of the hexadecimal string which starts at 1 'a '?

    Thank you for your help.

    You will need to provide more information. You have a string that has values of bytes like this? In other words, you have the control/indicator string value "hex display mode", and that you have provided, that's what you have? Or, you have the string in normal view?

    If it is in hexadecimal display mode, then use one of the functions of the chain to get a subset of the string. Have you looked in the channel palette?

    If it is in normal display mode, then you must convert all 2 characters to hex values.

    To learn more about LabVIEW, it is recommended that you go through the tutorials and look over the material in tutorials the NI Developer Zone Learning Center , which provides links to other materials and other. You can also take a course online for free.

  • How to find the rank lowest for each student using a Select query?

    Hey I'm having a little trouble here

    I have this table


    Student - Grade

    John - 8
    Richard - 9
    Louis - 9
    Francis - 5
    John - 13
    Richard - 10
    Peter - 12

    Shades may vary from 0 to 20.

    Name - varchar (50)
    Grade - wide

    I'm trying to generate a SQL search to search for each rank lowest for each student.

    So far, I did:

    Select s.name, s.grade
    s student
    where s.grade = (select min (grade) of student)

    The result of this search returns me only the rank lowest of all ranks posted above, which is Francis - 5.

    I want to find the lowest rank, but not only for Francis, but for all students in the table.

    How do I do that?

    Thank you in advance.

    Ok

    Now we head into analytical SQL:

    with student as (select 'John' name, 8 grade, 'fail' result from dual union all
                     select 'John' name, 13 grade, 'pass' result from dual union all
                     select 'Francis',     5 grade,  'fail' from dual union all
                     select 'Peter', 12, 'pass' from dual)
    -- End of your test data
    SELECT   name,
             MAX (result) KEEP (DENSE_RANK FIRST ORDER BY grade) result,
             MIN (grade) min_grade
    FROM     student
    GROUP BY name
    

    Please note that I passed ;)

    Concerning
    Peter

    To learn more:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions056.htm#SQLRF00641

  • Want to know how to find the alias to a random file using applescript

    Hi, I was wondering if I can find the alias for any file that I even clicked on using applescript.

    I searched online, and there is not much that I can take some.

    So, for example in applescript I "put fileToFind to alias (...)" but this alias depends entirely on the single user, click on the file. So I do not know this alias exactly, is there a way that I can put this variable "fileToFind" to an appropriate alias of the file I even clicked on?

    single click

    Info (CMD + i)

  • How to find the mode of a string array

    Hey guys,.

    Then I came across this little problem that I thought I could solve easily enough, but it turned quite messy.

    I have this array of strings, and I want to find the most frequent entry in this array. Let's say I have the following table.

    Apple

    Apple

    Kiwi

    Orange

    Apple

    the mode would give me apple. I thought to convert the strings into a number and then find fashion as usual.

    But if the chain is too long, it seems a superelevation of unique number used to represent.

    Any ideas on a clean way to do this?

    This can also work

    Nick

  • How to find the union between 2 strings

    Hello


    Here are 2 string as a samble of my 2 tables,
    1 (; 1; 10; 2; 3; 4; 5; 7; 8)
    2 (; 10; 2; 3; 4; 5; 8; 9)

    I need to find the union between these 2 strings, the result should be
    result of the union = (; 1; 10; 2; 3; 4; 5; 7; 8; 9)

    any help please,.

    Hello

    Sorry; until you have validated your tables, I couldn't test it.
    I forgot to attach cntr to each of the other tables. (It's all the interest to generate cntr in the first place).
    That's what I should have posted:

    WITH     cntr     AS
    (
         SELECT     LEVEL AS n
         FROM     dual
         CONNECT BY     LEVEL <= 10
    )
    SELECT     REGEXP_SUBSTR ( a.txt_a
                    , '[^(;)]'
                    , 1
                    , ca.n
                    )          AS itm
    FROM          table_a     a
    CROSS JOIN     cntr     ca
         --
        UNION
         --
    SELECT     REGEXP_SUBSTR ( b.txt_b
                    , '[^(;)]'
                    , 1
                    , cb.n
                    )          AS itm
    FROM          table_b     b
    CROSS JOIN     cntr     cb
    ;
    

    Output given your sample data:

    ITM
    -----------------
    
    1
    2
    3
    4
    
  • How to find the location of a file or folder in windows 7

    I have a few games on my computer. I can't find the location of the original file for them however. What I find is that they are in the 'games' folder that is included with windows 7. However, the whole files are not there. Only a little bit of information for the game is stored here. What I need to know is: how to find the original location? I tried the search bar "search programs and files" under the start menu, but the only place that appears is the Games folder. I need to know this, because I want to try modding my game called "Civilization 4. Can you please help?

    Try this...

    Start button > in the search box, type the name of the gam, i.e. of Civilization 4 > (do NOT press enter) > top left corner, you see the name "Civilization 4 '?

    If so, right click on it > click Open File Location > the game exe file show be on the highlighted list > right click it > click on create a shortcut.

    Happens to you?

  • How to find the location of a (game) file or a folder in windows 7

    I have a few games on my computer. I can't find the location of the original file for them however. What I find is that they are in the 'games' folder that is included with windows 7. However, the whole files are not there. Only a little bit of information for the game is stored here. What I need to know is: how to find the original location? I tried the search bar "search programs and files" under the start menu, but the only place that appears is the Games folder. I need to know this, because I want to try modding my game called "Civilization 4. Can you please help?
    I have a few games on my computer. I can't find the location of the original file for them however. What I find is that they are in the 'games' folder that is included with windows 7. However, the whole files are not there. Only a little bit of information for the game is stored here. What I need to know is: how to find the original location? I tried the search bar "search programs and files" under the start menu, but the only place that appears is the Games folder. I need to know this, because I want to try modding my game called "Civilization 4. Can you please help?

    Program Files or Program Files (x 86) is where almost everything is installed - including games.

  • How to find the location of a cluster?

    If I have a Cluster123 cluster name. How to find the location of this cluster? for example, YellowFolderA/YellowFolderB/Cluster123

    Try something like this

    $clusterName = "MyCluster"
    
    $path = @()$cluster = Get-Cluster -Name $clusterName$parent = Get-View $cluster.ExtensionData.ResourcePoolwhile ($parent.parent){  $parent = Get-View $parent.parent  $path += $parent.Name}[array]::Reverse($path)[string]::Join('/',$path)
    
  • How to find the password for wifi connection?

    I'm trying to connect my iphone to my internet TV. On my phone, it asks me a password to connect to my network TV (different from the wifi network that I connected my TV) and I have no idea how to find the password.

    Hello Pam,.

    Welcome to the community of Sony.

    What is the model # of the TV?

    You can locate the model # of the TV from this link.

    The password has been entered in the iPhone is the WPA password.

    See the following article in the knowledge base to use the Wi - Fi Direct feature with your iPhone.

    https://us.en.KB.Sony.com/app/answers/detail/A_ID/34416

    Please mark it as "acceptable Solution" If you find this information useful.

    Kind regards

    Colby

  • How to find the path of a file

    Hello

    I have Windows 7 Starter.

    The search utility can be used to search for files by using the ' * ' wildcard, but unfortunately it does not show the path for no results.

    I would like to know how to find the path of a file of my choice.

    For example, I record a radio on the internet, which is then saved as "MP3". Now, I want to edit such a file, but I need to know where the file is actually stored. Simply access within a 'library' does not show me where the file is actually located.

    How to discover all paths where a particular file format?

    I hope to receive a response to this request.

    Kind regards

    Rayt333

    An option for the search utility see the paths for all of its results, would be useful.

    Hi Ray

    Overall view for the search folder for Detailsof Windows Explorer , by using the View Menu on the right side of the toolbar.

    Click on the last name column heading and select the folder item.

    If you do not see the folder item, click other, scroll and select the folder item. This will add the folder column.

    Use the left mouse button to drag the folder column to the left, next to the column name .

    Now, when you perform a search, the folder column will show the path of each file found.

    Concerning

  • How to find the e-mail address for my HP 6700? Printer shows E-Print connected.

    I am using the Forum to get a new code to the printer and the printer shows homepage that's on, but now I don't know how to find the e-mail address for my computer.

    Hello

    In the front of the printer, go to configuration. Locate and enter the Web Services. Aprove any step to activate the service... leave the system a few minutes to complete your registration, a page will be printed automatically with the code printer and directions to select the email address of hpeprint.com.

    Kind regards.

  • How to find the last pasted paragraphs FMP?

    I'm sticking FMP several objects at once in a file (a file of changes to the sections containing the changebars) in the main text flow. I want a separator line to go at the end of each pasted section, so I try to insert one after the paste operation. But instead of a line between each section, all lines are added at the end of the file, after all the sections. So if there are 3 glued sections at the end of the file are three lines. My code is below, do you know how I could fix this?

    Thank you, Mark

    function copyPasteChanges (doc, chgRange) {}

    Select the section with changebar and copy it.

    doc. TextSelection = chgRange;

    doc. Copy();

    Prepare for the changes doc and paste there the modified section.

    var firstChgPgf = changesDoc.MainFlowInDoc.FirstTextFrameInFlow.LastPgf;

    var changesTloc = new TextLoc (firstChgPgf, Constants.FV_OBJ_END_OFFSET);

    var changesTRange = new TextRange (changesTloc, changesTloc);

    changesDoc.TextSelection = changesTRange;

    changesDoc.Paste ();

    To go at the end of the file again (I think)

    var lastPgf = changesDoc.MainFlowInDoc.FirstTextFrameInFlow.LastPgf;

    var dividerPgf = changesDoc.NewSeriesPgf (lastPgf);

    var TLoc = new TextLoc (dividerPgf, 0);

    changesDoc.AddText (TLoc, '_');

    }

    Hi Mark,

    The problem is that the dough does not occur when you think. The dividing line is added at the end of the file, but are not your actions of dough. Actually, I think that maybe a little random where pasta is produced, because this line:

    var changesTloc = new TextLoc (firstChgPgf, Constants.FV_OBJ_END_OFFSET);

    .. .is does not create a valid text location. You can check this by abandoning the service after:

    changesDoc.TextSelection = changesTRange;

    .. and look at where's the insertion point. It will probably be everywhere where you left it last, because the call is not valid. I can't tell you exactly why, except that it has something to do with the fact that you are using the last paragraph in the stream. There is something weird to try to define a range of full-paragraph text with the last paragraph. I'm sure it's related to how the last TFP in a stream does not show a mark of FMP, but beyond that, I don't know how to do what you're trying to do with the last paragraph.

    Having no knowledge of how do it right, any time I need to do this, I create a paragraph "dummy" at the end of the flow to fill that space strange 'last FMP", then do the work around it. In the end, I just want to remove fake TFP. I don't know if it's a good idea or not, but it's the only way I ever get it to work and it sorts the mirror how you could do this manually in the GUI.

    With this, I modified your script as follows, and it seems to work better. Note that I also modified the logic of how to find the last paragraph of the flow by writing a separate function. Your call to the 'FirstTextFrameInFlow' is OK, unless your doc begins to span several pages and/or begins with several empty pages. The function I wrote ensures that you really the last TFP in the stream.

    I hope this helps.

    Russ

    function copyPasteChanges (doc, chgRange) {}

    Select the section with changebar and copy it.

    doc. TextSelection = chgRange;

    doc. Copy();

    Prepare for the changes doc and paste there the modified section.

    var lastPgf = getLastPgf (changesDoc);

    var dummyPgf = changesDoc.NewSeriesPgf (lastPgf);

    var changesTloc = new TextLoc (dummyPgf, 0);

    var changesTRange = new TextRange (changesTloc, changesTloc);

    changesDoc.TextSelection = changesTRange;

    changesDoc.Paste ();

    To go at the end of the file again (I think)

    Don't forget that last TFP is now fake TFP

    lastPgf = getLastPgf (changesDoc);

    var dividerPgf = changesDoc.NewSeriesPgf (lastPgf.PrevPgfInFlow);

    var TLoc = new TextLoc (dividerPgf, 0);

    changesDoc.AddText (TLoc, '_');

    dummyPgf.Delete ();

    }

    function getLastPgf (doc)

    {

    textFrame var is doc. MainFlowInDoc.LastTextFrameInFlow;

    var lastPgf = textFrame.LastPgf;

    While (! lastPgf.ObjectValid () & textFrame.ObjectValid ())

    {

    textFrame = textFrame.PrevTextFrameInFlow;

    lastPgf = textFrame.LastPgf;

    }

    Return lastPgf;

    }

  • How to find the OS ppid in v$ session and V$ process

    Hello

    Oracle 11gDB

    I have this suspiscious process in my session of $ v which is always running and connected to a 'HR' scheme, even if the 'HR' application is also stopped and other HR related batch process.
    And he also told me that it came from the UNIX sun-server1. My problem is that I can not locate the PPID OS for this process when I login to the operating system to the Sun-server1.
    I tried to kill this session, but he maintains the connection. Even if I bounce the database, it come back.

    How to find the source of this process to the Sun-server1?

    I tried this script:
    SELECT     p.program, p.spid
    FROM v$session s, v$process p
    WHERE s.paddr = p.addr
    AND s.sid IN (39)
    Program                                                 Spid
    ============    ====
    ORACLE.EXE (SHAD)     6404
    But if I have a ps - ef | grep 6404 there is no existing process OS. No matter what other script that can identify the process id of the operating system?


    Thank you very much

    KinsaKaUy? wrote:
    Thanks Sb, what is your new name :)

    Who do you think is the culprit?

    root@sun-server1 # ps -ef|grep "May 16"
    v231sys  7065  7051   0   May 16 pts/1      11:16 /usr/jdk/jdk1.5.0_13/bin/sparcv9/java -server -Xms1024m -Xmx1024m -XX:MaxPermSi
    v231sys  7051     1   0   May 16 pts/1       0:00 /bin/sh startWebLogic.sh V231_ABDC
    root 13117 11928   0 12:56:30 pts/3       0:00 grep May 16
    v231sys  7229  7065   0   May 16 pts/1       1:17 /opt/SPLcobAS51/bin/cobjrun64 -Dcom.microfocus.cobol.cobjvm=sun_150_64 -DSPLCJV
    v231sys  6257  8518   0   May 16 pts/1       0:00 bash
    v231sys  7211  7065   0   May 16 pts/1       1:17 /opt/SPLcobAS51/bin/cobjrun64 -Dcom.microfocus.cobol.cobjvm=sun_150_64 -DSPLCJV
    

    When the process lasts more than 24 hours, you can get is no longer hours or minutes.
    You can use the utility "netstat" to connect the source & destination?

    If this isn't the case, random randomly start put to death via kill - 9 until you success!

  • How to find the page contains the indesign sdk?

    PLS, someone help me, how to find the page contains the indesign sdk?

    Thank you

    screen410099

    Don't know, if you find a shorter way, but it works:

    UIDRef language = YOUR_TABLE;

    Error result code.

    do

    {

    InterfacePtr textModel;

    TextIndex beginning;

    Len Int32;

    result = table_get_text_model (read, 0, 0, textModel, start, len);

    If (result! = kSuccess) break;

    If (! textModel) break;

    UIDRef frameRef = text_query_frame (textModel, start);

    If (! frameRef) break;

    Int32 pnum = - 1;

    PageRef UIDRef = page_getref (frameRef, &pnum);)

    If (! pageRef) break;

    :

    :

    } While (false);

    //***************************************************************************

    Error code (Table_get_text_model)

    Language UIDRef,

    Int32 left,

    top of Int32,

    InterfacePtr & textModel,

    TextIndex & start,

    Int32 & len)

    {

    Result ErrorCode = kFailure;

    do

    {

    Inits

    textModel = InterfacePtr (Nile);

    Start = 0;

    Len = text::kTextLen;

    Make sure that we have a valid table model

    InterfacePtr tableModel (label, UseDefaultIID());

    if(!tableModel) break;

    convert the network to a network ID address

    GridAddress gridAddress (top, left);

    get the container text table so we could make the text template.

    InterfacePtr tableTextContainer (tableModel, UseDefaultIID());

    if(!tableTextContainer) break;

    textModel = InterfacePtr (tableTextContainer-> QueryTextModel());

    if(!textModel) break;

    InterfacePtr tableTextContent (tableModel, UseDefaultIID());

    if(!tableTextContent) break;

    GA GridArea (up, left, top + 1, left + 1);

    Len = tableTextContent-> GetTextChunk (ga, start);

    If (! len) break;

    result = kSuccess;

    } While (false);

    return the result;

    }

    //***************************************************************************

    #if (csversion_<>

    # define ITextFrameC_ ITextFrame

    #else

    # define ITextFrameC_ ITextFrameColumn

    #endif

    UIDRef text_query_frame (InterfacePtr txt, TextIndex istartPos)

    {

    UID uid = kInvalidUID;

    TextIndex startPos = istartPos;

    do

    {

    If (! txt) break;

    INNERE Textrahmen of the items

    InterfacePtr frameList (txt-> QueryFrameList ());

    If (! frameList | frameList-> GetFrameCount ())<= 0)="">

    First INNERER Textrahmen of the items

    InterfacePtr textFrame (frameList-> QueryNthFrame (0) / * QUF,: UseDefaultIID () * /);

    #ifndef (csversion_<>

    Location of RangeData (startPos, startPos);

    #else

    TextIndex location = startPos;

    #endif

    Int32 frameIndex = - 1;

    InterfacePtr tf = InterfacePtr (Nile);

    If (startPos < txt-=""> tf TotalLength ()) = InterfacePtr (frameList-> QueryFrameContaining (location, & frameIndex));

    of other tf = InterfacePtr (frameList-> QueryNthFrame (frameList-> GetFrameCount () - 1));

    If textFrame (tf) tf =;

    If (! textFrame) break;

    //

    Aus dem first inner Textrahmen bilden wir jetzt eine hierarchy.

    In der Ebene uber hierarchy suchen wir jetzt nach nach einem dieser

    Objekt, das ein Graphicrahmen ist. Dieses element ist der gesuchte

    ÄUßERE Rahmen.

    //

    InterfacePtr child (textFrame, UseDefaultIID());

    If (! child) break;

    do

    {

    InterfacePtr parent (child-> QueryParent());

    If (parent == nil) break;

    InterfacePtr graphicFrameData (parent, UseDefaultIID());

    If (graphicFrameData! = nil)

    {

    We have a regular text frame.

    UID =: GetUID (graphicFrameData);

    break;

    }

    child = parent;

    } While (child! = nil);

    } While (false);

    If (uid == kInvalidUID) return UIDRef (Nile, kInvalidUID);

    Return UIDRef (: GetDataBase (txt), uid);

    }

    //***************************************************************************

    #if (csversion_<>

    # define GLayout_:

    #else

    # define GLayout_ Utils ()->

    #endif

    UIDRef page_getref (const UIDRef & frameRef, int32 * pgNum)

    {

    UIDRef result = UIDRef::gNull;

    do

    {

    If (pgNum) * pgNum = 0;

    If (! frameRef) break;

    InterfacePtr itemHier (frameRef, IID_IHIERARCHY);

    If (! itemHier) break;

    If (! pause frameRef.ExistsInDB ());

    ES more like evil EIB GetOwnerPageUID AB. ICH denke badly, at least

    Ein muss ein Rahmen wohl schon haben Parent. Wenn wir da keinen find,.

    tschüss Dann.

    InterfacePtr parent (itemHier-> QueryParent());

    If (! parent) break;

    PageUID UID = GLayout_ GetOwnerPageUID (itemHier);

    If (pageUID == kInvalidUID) break;

    result = UIDRef (frameRef.GetDataBase (), pageUID);

    If (pgNum)

    {

    IDataBase * db = frameRef.GetDataBase ();

    If (! db) break;

    UIDRef docRef (db, db-> GetRootUID ());

    InterfacePtr PageList (docRef, IID_IPAGELIST);

    If (!.) (Break from PageList);

    Int32 pageIndex is PageList-> GetPageIndex (pageUID);.

    * pgNum = pageIndex;

    }

    } While (false);

    return the result;

    }

    //***************************************************************************

Maybe you are looking for

  • Unable to use K1100M in Windows 8.1 W540

    W540 not none K1100m in Autocad 2015 it only uses the onboard HD 4600. Autodesk has acknowledged the problem and said: "even if the notification icon of GPU in the status bar that reads using its CAD, sound only read the file that the cpu is off so t

  • T410i numbers do not work except the 5 and 6

    Having a problem with the normal numbers does not. This has nothing to do with them being dirty or who need to be replaced, nor is the number lock on. None of the numbers works except the 5 and 6. If I'm in firefox by typing in the google search bar

  • How do I interface NI USB 6210 with AC DRIVE (YASKAWA j1000)

    I want to control the motor speed AC 3 phase through PC. I use labview for programming software. I use as an interface NI USB DAQ 6210. Problem is that I am unable to understand the interface OR USB with INVERTER AC. Help me.

  • Make a parallel loop to wait for an event?

    I'm working on building my first application designed master/slave, and I ran a little bit of a team of design and could use some advice.  Basically, I have my main loop, and then a couple of slave makes a loop to run a different treatment. It is ver

  • Programs for the shortcut icons on the desktop of the user different?

    My adult son and I are two Admins on what is basically a computer. I try to keep a very clean desktop so that I can easily find any new DOCS or IE shortcuts.We each have our own connections. He installed games with CD and when I connected and found n