Binds with string containing double quotes

Hello there,
I have the following SELECT statement which is run from a Delphi application :
SELECT Customer, Last_Name
FROM Customer
WHERE UPPER(Last_Name) LIKE :last;
:last has the string value of Smith"a".
Is there a problem with binds and strings wich contain double quotes?.
If so, how can I fix this problem?
Thanks,
Mia

Hi
There is no problem in this example. Content of bind variable is not part of syntc checking, so you can have any characters.
Regards
null

Similar Messages

  • StringTokenizer class problem with strings in double quotes

    Hello Technocrats,
    I have a problem with tokenizing following string enclosed in (). (abc," India, Asia", computer engineer). My separator is ",", thus StringTokenizer class gives me 4 tokens namely abc, "India, Asia" and computer engineer. But I require that String in double quotes should be a single token. How to achieve this using StringTokenizer class? Or is there any other way?
    Thanks in advance.

    Try
    String[] str="abc,\" India, Asia\",computer engineer".split(",",1);
              for(String s: str)
                   System.out.println(s);
              }Thanks.

  • Problem in insertion with string containing   ' (single quote)

    i have a text field in jsp.
    when i submit the content need to be inserted/updated.
    when the text field contains character's with single quote( ' )..
    i am unable to insert/update values in database..
    where as if the text field contains characters without single quote..there is no problem in Database insertion/updation.
    i am using create statement .. and oracle database..
    can any one help ...

    The usual answer for this in the JDBC forum (where this should have been posted because it's completely about JDBC) is to use a PreparedStatement.

  • Extracting string inside double quote

    Hi,
    In perl this is really easy, but I can't get it to work correclt in java. I'm trying to extract a string that is in double quotes following a keyword...
    String: SRCH base="o=answer" filter="me" attrs=ALL
    I want to extract the first quoted value after "SRCH base="
    In perl I used: / SRCH base=\"(.*)\" /i
    In java I'm using: " SRCH base=\"(.*)\" "
    The problem is that it doesn't stop after hitting the second quote. So I get this result:
    o=answer" filter="me
    Notice that it stopped matching after hitting the third quote. Weird.
    I know this is probably really simple, but I'm stumped.
    Thanks,
    Mark

    I guess if you wrote a regex that matches any string
    that starts with ", ends with ", and has anything in
    between you could use a Matcher to find each
    occurrence, but I don't regex enough to write it :)[url #" style="display: block; background-image: url('http://www.shanghaiist.com/attachments/shang_neil/bat-signal-edit.jpg'); width: 325px; height: 217px] 

  • Charecter strings in Double quotes

    Hi All,
    By default, all charecter strings in Oracle are enclosed within single quotes. Is there a way to make Oracle accept charecter strings enclosed in double quotes?
    Example
    Table A
    Ename varchar2(20)
    Current setup is
    INSERT INTO A VALUES('NEW_USER');
    What I need to do is
    INSERT INTO A VALUES("NEW_USER");
    Is this really possible?
    Thanks in advance
    A.P.Mageshwaran

    Why do you need to do this?
    APC

  • String without double quotes

    Hi,
    I am new to Java,
    I want to insert a string in database but it should not have double quotes.
    e.g i want to insert string TJ2003W.
    But when we declare this as string it is surronded by double quotes.
    Pls help reagrding this.

    Hi,
    I am new to Java,
    I want to insert a string in database but it should
    not have double quotes.
    e.g i want to insert string TJ2003W.
    But when we declare this as string it is surronded by
    double quotes.
    Pls help reagrding this.Hi,
    Strings are declared by double quotes. and when u insert them in database, just add the variable for string.
    Please elaborate your problem more.

  • How to replace single quote with double quote

    hai all,
    i have a problem,
    i am trying insert a string containing single quote into ms-access database.
    it is giving error.
    how can i avoid this .if i replace a single quote in the text with double quote it will defenitely
    insert into database.
    in java.lang.String
    replace () will not work to replace quote with double quote.
    any otherway to solve this problem.
    please mail me to [email protected]
    thank you
    sambareddy
    inida

    java.lang.String.replace () will not work to replace quote with double quote.Really?
    String x = ...
    x.replace( "'", "\"" );

  • Double Quotes in MaxL Strings

    I am trying to pass in a calc script string from a Perl script to a MaxL script. The calc script needs double quotes around some of the member names (yes, I know I can create aliases with underscores to work around this, but I can't believe this isn't possible). I can escape the double quote characters in Perl, no problem. But the double quotes just get stripped by MaxL. Here is an example:<BR><BR>MAXL> echo 'I am "quoting" this';<BR><BR>I am "quoting" this<BR><BR>MAXL> set X = 'I am "quoting" this';<BR><BR>MAXL> echo $X;<BR><BR>I am quoting this<BR><BR>MAXL><BR><BR>There is nothing in the docs about escaping double quote characters. I've tried using backslash, no luck there. I've tried using double double quotes and they all get stripped. I've tried doing this inside single quoted strings and double quoted strings - no joy whatsoever. The funny thing is the example above, where simply echoing the literal string works, but assigning it to a variable strips out the double quotes.<BR><BR>Does anyone know how to get double quotes into a MaxL string variable? There has to be a way...<BR><BR>Thanks,<BR><BR>James

    Yes, I've dealt with enclosing variables in double quotes in order for MaxL to parse them properly, but what I'm trying to do is use a variable that contains a double quote. Such as:<BR><BR> set QuoteVar = 'I am "quoting" this';<BR><BR>I'm trying to set substitution variables via MaxL, and some of my existing sub vars have double quotes in them so that they can be used to store member names that appear in calc scripts. As I said, I know I can accomplish this with an alias table that creates a version of the member name that doesn't need quotes, but that's a whole deal to maintain just for this one thing and it seems overly burdensome for such a simple task.<BR><BR>Also, as I said, MaxL does fine with double quotes in literal strings, it's only when assigned to variables that it always strips them out. I want to create a relatively generic script for setting sub vars, so I need to pass variables around. Just calling MaxL from Perl and passing in parameters that get converted to $1, $2, etc. causes these double quotes to get stripped.<BR><BR>So, is there any way around this?<BR><BR>Thanks,<BR><BR>James

  • Query filters with double quotes fail

    Hi,
    when I to execute a query with a filter that contains double quotes on
    Kodo 3.0.3 I get an Exception.
    Filter:
    string == \"My name is \"Wolfgang\".\"
    Kodo interprets the double quotes (after 'is ' )as the end of the string
    and expects the next token ('Wolfgang') to be an attribute name.
    Is there an escape character for double quotes or any other solution?
    Exception:
    kodo.util.UserException: Attempt to query nonexistant or unm
    anaged field "Wolfgang" of type "de.logas.datenbank.jdo.BeispielKlasse1".
    at kodo.query.FilterParser.traversePath(FilterParser.java:1061)
    at kodo.query.FilterParser.eval(FilterParser.java:783)
    at kodo.query.FilterParser.getValue(FilterParser.java:999)
    at kodo.query.FilterParser.eval(FilterParser.java:813)
    at kodo.query.FilterParser.getExpression(FilterParser.java:1021)
    at kodo.query.FilterParser.parseFilter(FilterParser.java:204)
    at
    kodo.query.JDOQLQuery$DataStoreQueryExecutor.<init>(JDOQLQuery.java:4
    27)
    at
    kodo.query.JDOQLQuery.newDataStoreQueryExecutor(JDOQLQuery.java:99)
    at kodo.query.AbstractQuery.internalCompile(AbstractQuery.java:576)
    at kodo.query.AbstractQuery.compile(AbstractQuery.java:531)
    at kodo.datacache.CacheAwareQuery.compile(CacheAwareQuery.java:271)
    -- Wolfgang

    Also, in general, it is advantageous to separate variable content in a
    query out into parameters. This helps us out when maintaining our query
    compilation cache.
    -Patrick
    Stephen Kim wrote:
    Wolfgang,
    To do this in JDO you have to double escape it
    i.e. string== \"My name is \\\"Wolfgang\\\".\"
    Wolfgang Hutya wrote:
    Hi,
    when I to execute a query with a filter that contains double quotes on
    Kodo 3.0.3 I get an Exception.
    Filter:
    string == \"My name is \"Wolfgang\".\"
    Kodo interprets the double quotes (after 'is ' )as the end of the string
    and expects the next token ('Wolfgang') to be an attribute name.
    Is there an escape character for double quotes or any other solution?
    Exception:
    kodo.util.UserException: Attempt to query nonexistant or unm
    anaged field "Wolfgang" of type "de.logas.datenbank.jdo.BeispielKlasse1".
    at kodo.query.FilterParser.traversePath(FilterParser.java:1061)
    at kodo.query.FilterParser.eval(FilterParser.java:783)
    at kodo.query.FilterParser.getValue(FilterParser.java:999)
    at kodo.query.FilterParser.eval(FilterParser.java:813)
    at kodo.query.FilterParser.getExpression(FilterParser.java:1021)
    at kodo.query.FilterParser.parseFilter(FilterParser.java:204)
    at
    kodo.query.JDOQLQuery$DataStoreQueryExecutor.<init>(JDOQLQuery.java:4
    27)
    at
    kodo.query.JDOQLQuery.newDataStoreQueryExecutor(JDOQLQuery.java:99)
    at
    kodo.query.AbstractQuery.internalCompile(AbstractQuery.java:576)
    at kodo.query.AbstractQuery.compile(AbstractQuery.java:531)
    at
    kodo.datacache.CacheAwareQuery.compile(CacheAwareQuery.java:271)
    -- Wolfgang

  • Regex with strings that contain non-latin chars

    I am having difficulty with a regex when testing for words that contain non-latin characters (specifcally Japanese, I haven't tested other scripts).
    My code:
    keyword = StringUtil.trim(keyword);
    //if(keywords.indexOf(keyword) == -1)
    regex = new RegExp("\\b"+keyword+"\\s*;","i");
    if(!regex.test(keywords))
    {Alert.show('"'+keywords+'" does not contain "'+keyword+'"'); keywords += keyword + "; ";}
    Where keyword is
    日本国
    and keywords is
    Chion-in; 知恩院; Lily Pond; Bridge; 納骨堂; Nōkotsu-dō; Asia; Japan; 日本国; Nihon-koku; Kansai region; 関西地方; Kansai-chihō; Kyoto Prefecture; 京都府; Kyōto-fu; Kyoto; Higashiyama-ku; 東山区; Places;
    When the function is run, it will alert that keywords does not contain keyword, even though it does:
    "Chion-in; 知恩院; Lily Pond; Bridge; 納骨堂; Nōkotsu-dō; Asia; Japan; 日本国; Nihon-koku; Kansai region; 関西地方; Kansai-chihō; Kyoto Prefecture; 京都府; Kyōto-fu; Kyoto; Higashiyama-ku; 東山区; Places; " does not contain "日本国"
    Previously I was using indexOf, which doesn't have this problem, but I can't use that since it doesn't match the whole word.
    Is this a problem with my regex, is there a modifier I need to add to enable unicode support or something?
    Thanks
    Dave

    ogre11 wrote:
    > I need to use refind to deal with strings containing
    accented characters like
    > ?itt? l?su, but it doesn't seem to find them. Also when
    using it with cyrillic
    > characters , it won't find individual characters, but if
    I test for [\w] it'll
    > work.
    works fine for me using unicode data:
    <cfprocessingdirective pageencoding="utf-8">
    <cfscript>
    t="Tá mé in ann gloine a ithe;
    Nà chuireann sé isteach nó amach
    orm";
    s="á";
    writeoutput("search:=#t#<br>for:=#s#<br>found
    at:=#reFind(s,t,1,false)#");
    </cfscript>
    what's the encoding for your data?

  • Trouble with String.replaceAll( )

    Hi,
    I have a string which contains instances of the backslash character followed by the double quote character and I'd like to replace those two characters with just a double quote. Or to put it slightly differently, I'd like to remove all backslash characters which precede double quotes. It seems like this should be straight-forward, but for some reason, I'm not getting the results I expect.
    Here is my code:
              String s1 = "Foo\\\"Bar";
              System.out.println("s1 = " + s1);
              int len = s1.length( );
              System.out.println("s1.length( ) = " + len);
              String s2 = s1.replaceAll("\\\"", "\"");
              System.out.println("s2 = " + s2);
              len = s2.length( );
              System.out.println("s2.length( ) = " + len);
    And here is the corresponding output:
    s1 = Foo\"Bar
    s1.length( ) = 8
    s2 = Foo\"Bar
    s2.length( ) = 8
    So, the string isn't being changed at all. What am I doing wrong? Thanks in advance for any replies.
    -ts1971

    Melanie_Green wrote:
    string.replaceAll()Takes two arguments, the first is a regular expression, the second is a String. Regular expressions have their own syntax compared to Strings, to match a single black slash in a regular expression you must write "\\\\".
    MelJust a little nit-pick: the second parameter is not a plain String but a "regex replacement String". In it, the following characters have a special meaning and therefore need to be escaped if you'd like to use them as literals:
    $    // used for match-group interpolation
    \    // used to escape '$' and '\' itself

  • Problems parsing double quote

    I have been trying to figure out my problem for several hours, but still didn't get it. Hope to get an idea from you guys. My code is as follows:
    var astr;
    var outCr ="|";
    var outLf = "\u0000";
    var cr = "\n";
    var lf ="\r";
    var ddQuote=""";
    var dtQuote='\"';
    astr = "<%=firstDesc%>";
    astr.replace(outCr,cr);
    astr.replace(outLf,lf);
    astr.replace(ddQuote, dtQuote);
    while (astr.indexOf(outCr) > 0) {
    z = astr.indexOf(outCr);
    astr = astr.substring(0, z) + cr + astr.substring(z+1,astr.length );
    while (astr.indexOf(outLf) > 0) {
    z = astr.indexOf(outLf);
    astr = astr.substring(0, z) + lf + astr.substring(z+1,astr.length );
    while (astr.indexOf(ddQuote) > 0) {
    z = astr.indexOf(ddQuote);
    astr = astr.substring(0, z) dtQuote astr.substring(z+1,astr.length );
    document.form1.description.value=astr;
    The value of firstDesc is a very big string from the database that contains carriage return, linefeed, single quote and double quote. It needs to be displayed in a HTML text area. Now everything works fine except the double quote. A firstDesc value containing double quote will not appear in the text area, and it even stop my jsp page and disable other buttons. But if I get rid of the code handling the double quote, everything works fine. What's the problem?

    maybe you should ask this question in a JavaScript forum.

  • SQL Loader - double quote within data

    Hi,
    I'm putting together some SQL loader scripts to load source data into a DB. The data we are receiving is comma delimited, optionally enclosed by double quotes (").
    e.g. "abc","123","this is a "test"","987"
    The problem I've got is that some data items contain double quotes ("test") as part of the data and this cause the SQL Loader to fall over with the error:
    Record 14644: Rejected - Error on table x, column y.
    no terminator found after TERMINATED and ENCLOSED field
    Is it possible to load this without changing the extraction process from the source system?
    My .ctl file looks like this:
    LOAD DATA
         INFILE '../data/toload/BR_ADDRESS.CSV'
         APPEND INTO TABLE STA_COMP_BRADD
         FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
         etc....
    Message was edited by:
    MaximumStagg

    Hi,
    Look in to this in Oracle documentation:
    "If two delimiter characters are encountered next to each other, a single occurrence of the delimiter character is used in the data value. For example, 'DON''T' is stored as DON'T. However, if the field consists of just two delimiter characters, its value is null."
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm
    Thanks,
    Kishore

  • FTP "PWD" and unescabe double quotes

    HI
    I am using LV8.2.1 and the internet toolkit.
    There is a FTP function called "PWD"(print working directory) who I think got a bug.
    It don't put out the working direktory.
    It take the reply text ( ex: Current working directory is "fs")and use the subVI "unescabe double quotes.vi" to remove the quotes, but this subVI need to have a string where the hole text is surrounded with double qoutes.
    The FTP "PWD" function send a string like this( ex: Current working directory is "fs") to the subVI and that result in an empty string out.
    Take a look at the attached pictures.
    regards Bjarne
    Attachments:
    FTP [PWD]_BD.png ‏5 KB
    Unescape Double Quotes_BD.png ‏11 KB

    Hi Bjarne,
    what FTP server are you using? It seems your FTP server doesn't follow the protocol. The response to a "PWD" should be like this:
    257 "/path/on/server" [is current directory.]
    It should start with the 257 code, followed by the path surrounded by double quotes.
    If the FTP server follows the protocol the PWD VI works just fine.
    As a workaround, you can use the "reply string" output of the PWD VI and use a match pattern to find the portion string between double quotes.
    Daniel
    Message Edited by dan_u on 03-11-2009 02:34 PM

  • How to handle ' " '(double quotes) in .csv file during migration

    I am facing problem in migrating data from sql server 2000 into oracle via .csv file using sql loader.
    1>How should i migrate the string which contains ' " ' (double quotes) characters,
    as i am enclosing the string in ' " ' in .ctl file (enclosed by ' " ').
    is there any syntax in the control file which can migrate the ' " '(double quotes) as it is as the data in the files is 50000 records .?
    Thank you..

    Yes this is correct.
    but problem will occur when e.g check the foll. string.
    (1001,And I quote "This, will work")
    Here it is a comm(,) in b/w "This and will".
    due to this sqlldr interpret it as end of field. and throws an error.
    I had gone through expert one on one oracle, what it maintioned as,
    put an extra double quotes( " ) like " " to enclosed the double quoted string.
    This works fine. For small data it can be done manually.
    But for large data what condition can be put in the ctl file to achieve this?
    or is there any other way to achieve this?
    Thank you.

Maybe you are looking for