' character in text string

I am trying to update a table to set a text string equal to a string that contains a ' single quote as a part of the string. This is unfortunately often necessary with chemical names, where the ' means prime. SQL thinks that this is an ending to the string, and so gives an error. I have tried using escape characters (\ and {}), but it has not fixed the problem. Any help would be appreciated.
SQL> update occurrence_standards set name='DDE, p,p'-' where pcode='49328';
ERROR:
ORA-01756: quoted string not properly terminated
SQL> update occurrence_standards set name='DDE, p,p\'-' where pcode='49328';
ERROR:
ORA-01756: quoted string not properly terminated
SQL> update occurrence_standards set name='{DDE, p,p'-}' where pcode='49328';
ERROR:
ORA-01756: quoted string not properly terminated

Use 2 single quotes.
John

Similar Messages

  • How do I convert an alpha character from a text string to its decimal value

    I am trying to find out the actual decimal value of a character in a string. So far the code below is as far as I got. I am able to get what I guess is a byte value.
    This is for a school assignment:
    The idea behind what I am trying to do is to design a hash function to store dictionary words into a bucket array hash table, without using the existing Hashtable.class
    so far this is what I can come up with to get some kind of value for each character in the string, however, what I am trying to get is the decimal value for each character.
    public static void main(String args[]){
         String word = "abcdefghijklmnopqrstuvwxyz";
         for (int i=0 ; i < word.length(); i++){
         System.out.print((word.substring(i,i+1)));
         System.out.print("\t : "+((word.substring(i,i+1))).getBytes());
    Thankyou for any replies.

    I'm not sure I completly understand your goal- what you mean by "decimal value", but, if you simply want to find the byte value of each character in a String, you would probably be better off using getBytes() in a way like this,
    byte [] bytes = string.getBytes();
    Then, if you need to map that to a charcter, you could use a for loop like
    for (int x = 0; x < bytes.length; x++) {
    table.put((char)bytes[x], bytes[x]);
    which assummes this bucket class of yours allows primitive data types like so (in Hashtable or HashMap, you would have to use a wrapper Object). I guess, my point reduces to, don't use substring and string search methods (like indexOf()), unless you have to because they are more expensive then just maping the array of bytes and chars, which seems to be what you are interested in doing.

  • Using & in a text string

    How can I use & in a text string so that the system doesn't ask for the user to enter a value. eg the string is Joe Blogs & Co. Currently the system asks for the user to enter text.

    Ferris
    An other option is to change your 'define'-character within SQL*Plus:
    SQL> sho define
    define "&" (hex 26)
    SQL> select 'AAA & BBB' from dual
    2 ;
    Enter value for bbb:
    SQL> set define #
    SQL> sho define
    define "#" (hex 23)
    SQL> select 'AAA & BBB' from dual
    2 ;
    'AAA&BBB'
    AAA & BBB
    1 row selected.
    Martin

  • How to replace a character in a string with blank space.

    Hi,
    How to replace a character in a string with blank space.
    Note:
    I have to change string  CL_DS_1===========CM01 to CL_DS_1               CM01.
    i.e) I have to replace '=' with ' '.
    I have already tried with <b>REPLACE ALL OCCURRENCES OF '=' IN temp_fill_string WITH ' '</b>
    Its not working.

    Hi,
    Try with this..
    call method textedit- >replace_all
      exporting
        case_sensitive_mode = case_sensitive_mode
        replace_string = replace_string
        search_string = search_string
        whole_word_mode = whole_word_mode
      changing
        counter = counter
      exceptions
        error_cntl_call_method = 1
        invalid_parameter = 2.
    <b>Parameters</b>      <b> Description</b>    <b> Possible values</b>
    case_sensitive_mode    Upper-/lowercase       false Do not observe (default value)
                                                                       true  Observe
    replace_string                Text to replace the 
                                         occurrences of
                                         SEARCH_STRING
    search_string                 Text to be replaced
    whole_word_mode          Only replace whole words   false Find whole words and                                                                               
    parts of words (default                                                                               
    value)
                                                                               true  Only find whole words
    counter                         Return value specifying how
                                        many times the search string
                                        was replaced
    Regards,
      Jayaram...

  • How to check the occurrence of a character in a string

    Hello Experts,
    I have a scenario where in I have to check the occurrence of a character in a string and based on that I have to pass a data into target field.
    I was wondering whether this can achieved with mapping functions or Do I have to use an UDF.
    Thanks in advance.
    Regards
    Advit Ramesh

    Hi Advit,
    You can achieve this by using standard function indexOf from the text category. Pass in the input string and the character value you want to check for as the input.
    Standard Functions (SAP Library - SAP Exchange Infrastructure)
    If the output is -1, then the character is not in the string, otherwise it is.
    Rgds
    Eng Swee

  • Replace a character in the string using JavaScript

    Hello,
    I would like to ask for help. I have a field in the xml file, which contains a string, that is bound to a text box on the form.
    What would be the syntax to replace a special character in the string with the carriage return?
    Thank you.

    Huh?
    I didn't post my script...
    It sure is no clean programming since I just took Steve's solutions and delted the ligns I didn't want (the app allert)
    Though in the end I've taken the boolean out, or better replaced it with the replacement function, it repeats the replacement no matter how much "ü"'s are in there. (I needed the boolean though, since as long as it was true, the if should be executed.)
    Somehow it worked... not 100% sure why, but it worked.
    if (findChar(this.rawValue)) {
    function findChar(str)
    {  for (var i=0; i < str.length; i++)
            if (str.charAt(i) == "ü")
               this.rawValue = this.rawValue.replace(/ü/,"ue")

  • NewLine Character in the String received from Interactive Adobe Form

    Hello Experts,
    Following is the issue we have with interactive Adobe Form
    We have a text area within the form. User enters the text in multiple lines in this text area.
    We are calling a backend function module designed in SE37 that accepts and process the data from the adobe form.  We are also processing the string data user enters in the text area.
    When we receive the string from the form, the newline character within the string is displayed as '#' in the debugger. We tried splitting this string using cl_abap_char_utilities=>newline and cl_abap_char_utilities=>cr_lf  but NO luck. Though in the debugger we see cl_abap_char_utilities=>newline  as '#'  in the debugger and also '#' is present within the string, for some reason when string is processed to find cl_abap_char_utilities=>newline, we can find/locate it.
    Because ABAP code is not able to identify the newline character within the string received from Adobe form, we are not able to maintain the formatting of the string as it was entered in the form.
    Any help to resolve this issue is appreciated.
    Thanks in Advance.
    Regards,
    Bhushan

    Hi Bhushan,
    I was going through your issue, and I feel this is something you can do with scripting. Basically you should read whole string and find the new line character and replace with a space or comma, as per your requirment.
    Do like following:
    In the exit event of the field select java script and write following code:
    var strng = this.rawValue;
    strng.replace(/\n/g, " ");
    above im reaplcing new line with a space.
    I think it should work I have not tested it. Pls update if you test it .
    Regards,
    Ravi.D

  • Correct way to search for character within a string

    I am trying to search for the occurrence of a "(" within a text string - unfortunately my code is reported as incorrect.
    I extract the text correctly but cannot create the search statement correctly:
    var mylistpgftext = pgf.GetText (Constants.FTI_String)   
    for (var i=0; i < mylistpgftext.length; i++)             
        var mylistitem = mylistpgftext[i].sdata              
        var mybracketpos = mylistitem.search(/(/i)    --------------error line-----------------       
        if (mybracketpos != -1)                              
          alert(mylistitem)                                  

    Hi Bob, I did not test this, but I think the problem is an unescaped character in your regular expression. Try this.
    var mybracketpos = mylistitem.search(/\(/i);
    Notice the backslash before the open parens that you are searching for.
    -Rick

  • Alternative to find unique records with 60 character in selection string.

    Hi,
    We have to find out the values from the Infoobject. When we try to display data from an master object, the maximum length of selection it accepts 45 characters only but we need to input data around 60 characters in selection.
    Thing we tried:
    1. Selecting complete data without any condition but it did not work due to large volume of data.
    2. We tried to extract data from RSA3 but it did not work due to large volume of data.
    Please suggest me alternative to find unique records with 60 character in selection string.
    Regards,
    Himanshu Panchal.

    This sounds a bit strange. Are you perhaps mistakenly storing text data incorrectly as the primary key of the master data? I can't think of any actual data that is that length to ensure usinqueness - even GUIDs are maximum 32 characters - but GUIDs don't count as actual "readable" data although you do need to be able to select it from time to time. Perhaps you have a super secure password hash or something like it ?
    Also are you expecting to have a unique single record returned by your selection? To do this would in general REQUIRE that ALL the data is read because master data is not stored in the DB sorted by the data itself, but stored instead sorted by the it's SID.
    When you say you are selecting data from master data, which master data tables are you using? I have been able to select data from very large MD table (15 million unique records) using SE16 with no problems. Just enter the table name, and before you execute just count the number of records - it helps to know what you want to end up with.
    Have you tried using wild cards (the *) to preselect a smaller number of records : * a bit of your 60 character string *
    If you are trying to select from a non-key field you will encounter performance issues, but you can still use the wildcards, and get a result.
    Don't use RSA3 it was designed to make selections and group them into datapackets. It's not the same as selecting directly on the table in SE11 or SE16

  • Convert text string file to object array without outputting to file first?

    I have a log file that is just a text string file which is appended to with Out-File.  If the log file does not exist I pipe headers to it so that I can import the data as CSV.  For example:
    DATA.LOG
    DATE,TIME,RESPONSE_TIME
    05-28-2014, 14:47, 132
    05-28-2014, 14:50, 94
    05-28-2014, 14:53, 72
    I'm using Microsoft Chart Controls to graph the data; it takes it in via CSV format.  If I'm going to chart all the entries in DATA.LOG I can simply IMPORT-CSV DATA.LOG.  But I only want to graph the 20 most recent entries.
    Perhaps there is a better way to do this, but to maintain the header and get the 20 most recent entries I'm using select.
    $DATA+=Get-Content .\data.log | select -first 1
    $DATA+=Get-Content .\data.log | select -last 20
    The problem is $DATA is of type system string so I can't use it directly with Chart Controls; I need to get it in CSV format first.  I can Out-File $DATA and then use IMPORT-CSV.  But I'd prefer to not have to use
    the temporary file.  Any suggestions on how I can accomplish this objective? 

    Import-CSV creates an object with the 'header' becoming the named values in the array.  The code I posted does the same thing as your 4 lines of code in one line of code:
    Much more quickly:
    PS C:\temp> (1..1000 | measure-command {import-csv .\data.log | select -last 2}).totalseconds
    0.4792951
    PS C:\temp> (1..1000 | measure-command {$DATATMP=@();$DATATMP+=Get-Content .\data.log | select -first 1;$DATATMP+=Get-Content .\data.log | select -last 2;ConvertFrom-CSV $DATATMP}).totalseconds
    1.6227726
    You're more than welcome to use whatever code you want, but if you want to improve your Powershell knowledge you should try to understand the object model around which Powershell is built, it is powerful and efficient.
    I hope this post has helped!

  • How can I display an icon, instead of text string, as a validation prompt?

    My validate method inside my custom validator is like this:
    public void validate(FacesContext context, UIComponent component, Object value) {
      Pattern datePattern = Pattern.compile("(\\d{2})/(\\d{2})/(\\d{4})");
      Matcher dateMatcher = datePattern.matcher((String)value);
      if(!dateMatcher.find()){
        ((UIInput)component).setValid(false);
        FacesMessage message = new FacesMessage();
        String msg = "[" + value + "] invalid date";
        message.setDetail(msg);
        context.addMessage(component.getClientId(context), message);
        FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_FATAL, "xx", "msg");
        throw new ValidatorException(facesMsg);
    }My JSP has this:
    <h:inputText id="test" value="#{projecthandler.test}">
    <f:validator validatorId="DateValidator" />
    </h:inputText>
    <h:message id="testErrorMessage" for="test"/>The <h:message> tag will kick in if the user has invalid data in the <h:inputText> field and clicks submit.
    When the page is regenerated, the user will see a text string reflecting what the issue is.
    However, instead of this, I would like to display an icon consisting of a red circle with an exclamation point.
    The user is supposed to click on the icon if they want more information. By clicking on the icon,
    the user will see a message box, with a description of the error.
    This is our standard for applications. I'm trying to put together a demo showing how an existing application
    would work in JSF, so I won't be able to talk others into using JSF, unless I can get the validation to display an
    icon instead of text.
    Edited by: Kazan on Mar 18, 2009 9:31 AM
    Edited by: Kazan on Mar 18, 2009 9:33 AM
    Edited by: Kazan on Mar 18, 2009 9:36 AM

    OK, I noticed a bug in my validate method. This is updated to fix the bug, and to include the recomendation about background-image:
      public void validate(FacesContext context, UIComponent component, Object value) {
        System.out.println("DateValidator.test.1");
        Pattern datePattern = Pattern.compile("(\\d{2})/(\\d{2})/(\\d{4})");
        Matcher dateMatcher = datePattern.matcher((String)value);
        System.out.println("DateValidator.test.1");
        if(!dateMatcher.find()){
          ((UIInput)component).setValid(false);
          FacesMessage message = new FacesMessage();
          String msg = "<span style='background-image: url(/error.gif)'/>";
          message.setDetail(msg);
          message.setSeverity(FacesMessage.SEVERITY_FATAL);
          context.addMessage(component.getClientId(context), message);
          throw new ValidatorException(message);
      }When I run this, the litteral string of "<span style='background-image: url(/error.gif)'/>" is printed as the message. It does not interpret this as a span tag with an image url.
    Can someone tell me what's going on?

  • Multi-language support for user-specified text strings used in the forms

    multi-language support for user-specified text strings used in the forms
    Instead of creating multiple forms, 1 in each different language, for the same service, is there any workaround?

    Hoan - is your question what are the considerations when creating multiligual catalogs? If so, I can tell you that at other clients I have seen them use a single catalog for one or two languages. For the two langugages, such as Spanish/English, you can create a single catalog with both of them. Once you get to more than two languages, the catalog would get unweildy and is therefore not suggested.

  • [Forum FAQ] How to find and replace text strings in the shapes in Excel using Windows PowerShell

    Windows PowerShell is a powerful command tool and we can use it for management and operations. In this article we introduce the detailed steps to use Windows PowerShell to find and replace test string in the
    shapes in Excel Object.
    Since the Excel.Application
    is available for representing the entire Microsoft Excel application, we can invoke the relevant Properties and Methods to help us to
    interact with Excel document.
    The figure below is an excel file:
    Figure 1.
    You can use the PowerShell script below to list the text in the shapes and replace the text string to “text”:
    $text = “text1”,”text2”,”text3”,”text3”
    $Excel 
    = New-Object -ComObject Excel.Application
    $Excel.visible = $true
    $Workbook 
    = $Excel.workbooks.open("d:\shape.xlsx")      
    #Open the excel file
    $Worksheet 
    = $Workbook.Worksheets.Item("shapes")       
    #Open the worksheet named "shapes"
    $shape = $Worksheet.Shapes      
    # Get all the shapes
    $i=0      
    # This number is used to replace the text in sequence as the variable “$text”
    Foreach ($sh in $shape){
    $sh.TextFrame.Characters().text  
    # Get the textbox in the shape
    $sh.TextFrame.Characters().text = 
    $text[$i++]       
    #Change the value of the textbox in the shape one by one
    $WorkBook.Save()              
    #Save workbook in excel
    $WorkBook.Close()             
    #Close workbook in excel
    [void]$excel.quit()           
    #Quit Excel
    Before invoking the methods and properties, we can use the cmdlet “Get-Member” to list the available methods.
    Besides, we can also find the documents about these methods and properties in MSDN:
    Workbook.Worksheets Property (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff835542(v=office.15).aspx
    Worksheet.Shapes Property:
    http://msdn.microsoft.com/en-us/library/office/ff821817(v=office.15).aspx
    Shape.TextFrame Property:
    http://msdn.microsoft.com/en-us/library/office/ff839162(v=office.15).aspx
    TextFrame.Characters Method (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff195027(v=office.15).aspx
    Characters.Text Property (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff838596(v=office.15).aspx
    After running the script above, we can see the changes in the figure below:
    Figure 2.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thank you for the information, but does this thread really need to be stuck to the top of the forum?
    If there must be a sticky, I'd rather see a link to a page on the wiki that has links to all of these ForumFAQ posts.
    EDIT: I see this is no longer stuck to the top of the forum, thank you.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Find and Replace text string in HTML

    Opps... I hope this forum is not just for Outlook. My Html files reside on my hard-drive. I am looking for VBA code to open specified file names ####File.html and then find and replace text strings within the html for example "####Name" replaced
    with "YYYYY"
    I drive the "####File.html" names and the find and replace text strings from an Excel sheet. I am an artist and this Sub would give me time to paint instead of find and replace text. Thank you!
    [email protected]

    Hello Phil,
    The current forum is for developers and Outlook related programming questions. That's why I'd suggest hiring anybody for developing the code for you. You may find freelancers, for example. Try googling for any freelance-related web sites and asking such
    questions there.
    If you decide to develop an Outlook macro on your own, the
    Getting Started with VBA in Outlook 2010 article is a good place to start from.

  • How to count number of occurences of a character  in a string

    I want to get the count of occurences of a character within a string. Is there any function for this or should i go for a PLSQL.
    For example is the sting is "occurences" & if i search for character "c", the answer should be 3.
    Regards,
    Sunil.

    SQL> select length('occurence') - length(replace('occurence','c')) from dual;
    LENGTH('OCCURENCE')-LENGTH(REPLACE('OCCURENCE','C'))
    3

Maybe you are looking for