How to find is character ?

Hi All,
I have a simple requirement and need some hint to resolve it.
I need to find rows of a table where third place in the column value is occupied by a character - (like A, E etc.)
SO that should return 23A1412,12D4124,32E3123 from below dataset.
1220212
23A1412
2312312
12D4124
32E3123
3123123
23V23143
Thanks
Bhushan

Hi try like this
SQL> with t as(select '1220212' test_string from dual union all
  2  select '23A1412' from dual union all
  3  select '2312312' from dual union all
  4  select '12D4124' from dual union all
  5  select '32E3123' from dual union all
  6  select '3123123' from dual union all
  7  select '23V23143' from dual)
  8  select test_string from t
  9  where regexp_like(test_string,'[0-9A-Za-z][0-9A-Za-z][A-Za-z]');
TEST_STR
23A1412
12D4124
32E3123
23V23143another test case
SQL> with t as(select '1220212' test_string from dual union all
  2  select '23A1412' from dual union all
  3  select '2312312' from dual union all
  4  select '12D4124' from dual union all
  5  select '32E3123' from dual union all
  6  select '3123123' from dual union all
  7  select 'abc23123' from dual union all
  8  select 'a3e23143' from dual)
  9  select test_string from t
10  where regexp_like(test_string,'[0-9A-Za-z][0-9A-Za-z][A-Za-z]');
TEST_STR
23A1412
12D4124
32E3123
abc23123
a3e23143Edited by: oracle_for_dude on Jul 29, 2009 2:46 PM

Similar Messages

  • How to find Client Character set?

    Hi,
    I need to connect to remote database which is having different character set than the client. Ia there any method to display client character and Database character set from SQL Plus? Could someone please help me.
    Thanks in Advance
    Sree.

    I guess you're using PL/SQL Developer?
    (because I get that warning message too ;) )
    The warning also continues with:
    You can set the client character set thought the NLS_LANG environment variable or the NLS_LANG registry key.
    If I execute some scripts from client (client character set WE8MSWIN1252 and database character set UTF8) will
    it cause any problem?It depends on what kind of data you're loading/importing. (chinese characters for example)
    I never had any problems at all, since I'm not using 'exotic' characters.
    You can find related threads on http://asktom.oracle.com/pls/asktom/asktom.search?p_string=%22UTF8%22
    and more explanations in the Oracle Globalization Guide: http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/toc.htm

  • How to find base character from an accented character

    Hi, given an accented character (�, �, �, etc...) is there a way to retrieve its base character? In the case above, a, o and c respectivelly?
    I searched in this forum and google and didn't find a definitive answer.
    The reason i need this is because in my database, some records have accented content, and now i need to generate a textfile to transfer daily to a bank, but the bank doesn't accept accented characters.
    Thanks.

    Decompose the Unicode string -- i.e., perform an NFC transformation -- and then strip off the diacritical marks, as done in VietPad editor.
    There is a native class, java.text.Normalizer, but it is not made public until Mustang release.
    http://java.sun.com/javase/6/jcp/beta/

  • How to find a character in a word

    Hello,
    I have the following String s = "Mapple am a apple";
    String s1 = "a";
    int index = s.indexOf(s1);
    Now i have to return a which is at the first place and if there are more letters after a . i.e i should return am a apple and not a in Mapple. HOw can i do this?
    Thanks n advance.
    sk

    hi,
    First put the string in Stringtokenizer.Select all words.then check what are the words that starts with "a".here is the program,
    String [] res_str=new String[25];
    int count=0;
    StringTokenizer stk=new ("hello i am having an apple"," ");
    while(stk.hasMoreElements())
    String str="";
    str=stk.nextElement();
    if(str.startsWith("a"))
    res_str[count++]=str;
    return res_str;
    try it ..its will work.
    bye,
    j.mouli

  • How to Find ":\" special character in INI file using powershell

    Hi Guys,
    I'm googleing last two days for subjected powershell script but no luck.
    could you please help me to write a PS to find :\ in INI file!
    Thanks in advance
    Er Reddy

    Select-String file.ini -pattern '\:\\'
    ¯\_(ツ)_/¯
    or 
    Select-String file.ini -pattern ':\' -SimpleMatch
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Find Database Character Set

    Friends,
    How to find "Database Character Set" of current database?

    Hi,
    SELECT * FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME LIKE '%CHAR%SET%';Yoann.

  • How to find 11i and r12 applications characterset

    Hi,
    How to find 11i and r12 applications characterset not of database only applications,What is IANA characterset asked in rapid install?How to find IANA character set in 11i and r12
    Regards

    Hi,
    How to find 11i and r12 applications characterset not of database only applicationsAs applmgr user, source the application env file and issue "echo $NLS_LANG".
    You can also get it from the application context file (search for <NLS_LANG oa_var="s_nlslang">).
    What is IANA characterset asked in rapid install?How to find IANA character set in 11i and r12This is documented in the installation manual.
    The IANA (Internet Assigned Numbers Authority) character set is the Internet-assigned standard character set name used by the Web server. See http://www.iana.org/assignments/character-sets for more information.
    Regards,
    Hussein

  • How to find number of characters in a character string

    Hi,
      Can anyone please tell me about how to find the number of characters in a character string type variable.
    Reagards,
    Siva

    hi,
    Use STRLEN for Calculating String Length..
    Assign it to integer variable for Further Use.Suppse u need to find string length for "hai".. this piece of code will help u
    data:  var type string value 'hai',
             len type i.
    len = strlen(var).
    write len.

  • How to find Database, APPL_TOP and IANA character set on 11i?

    Hi,
    Could you please tell How to find out Database character set, APPL_TOP character set and IANA character set on existing 11i environment?
    This is required to pass the input during R12 upgrade.
    Regards,
    AV

    Database:
    SQL> select value
    from V$NLS_PARAMETERS
    where parameters='NLS_CHARACTERSET';
    Application:
    $ echo $NLS_LANG
    IANA:
    Check the value of "s_iana_cset" context variable in the context file or check the value of "ICX:Client IANA Encoding" profile option.
    NLS Frequently Asked Questions [ID 399789.1]
    Oracle Applications 11i Internationalization Guide [ID 333785.1]
    How autconfig determines the value for Iana Charsets s_iana_cset value set in XML context file [ID 1380683.1]
    Thanks,
    Hussein

  • How to find out how many space character in setence (string var) ?

    Dear all Master,
    I need Your help please.
    Topic:
    Script Editor.
    My System:
    -CUCM 7.0
    -UCCX 7.0 premium
    -Nuance recognizer 9.0
    Question:
    ABC = string var.
    ABC = "this is sample"
    2 space character in ABC string var.
    How to find out how many space character in ABC var ?
    Regards,
    Susanto

    Hi
    Create a int variable called whatever you want, then insert a SET step.
    Set the variable to the new int you created, and then paste this into the 'value' field:
    String[] myarray = teststring.split(" ");
    return myarray.length -1 ;
    Basically it splits the string into chunks each time it hits the " " character.
    This results in an array of the resulting chunks (i.e. words), which is one more than the number of spaces. -1 from that, and you have your int variable set to the number of spaces.
    Regards
    Aaron
    Please rate helpful posts...

  • How to Find the Unicode of a character(s)?

    Dear all,
    How to find a unicode of a character in ABAP as we do in c or java,
    for: ex: i want to print the unicode of 'a' as: 90. some what like that.
    later i want to convert the string of characters in to " byte code stream".
    Please do help on this.

    Hi
    You can use FM HR_KR_STRING_TO_XSTRING.
    Regards
    Yossi.R.

  • How to find unicode equialent for a dbcs character

    I have one requirement from client to display DBCS ( Chinese, Japanese, etc.., ) characters in their equivalent unicode format. Every DBCS character should be displayed like &#xxx; in XML. In our project we create the XML dynamically. When we get the data initially we get it in DBCS. We need to convert that DBCS data character by character to the corresponding unicode values and put it in the XML that we create.
    My questions are :
    How to find out whether a particular character is a unicode character first ?
    I need your help on how to find the unicode equivalent values for each dbcs character ?

    Hopefully you get that data in some charset. You should not have to deal with low-level character conversion, just read the data into strings using that charset. (You can use the form of InputStreamReader that takes a charset name as the second parameter.) Put the strings into XML and when you write out the XML, the serializer will take care of putting valid and consistent data into the document. (That's assuming you're using a serializer that somebody else wrote and not just plain old Java I/O.)
    Looks to me like the hard part will be getting your client to tell you what charset the data is encoded in.

  • How to find 12,13 and 15 character products for 10 char product

    Hello Experts,
    I Hope  you are doing good.
    I am unable to find solution for the given below,Its very urgent.
    I have to find the 10 character products first. For every 10 chars product i have to find all the 12,13 and 15  chars product.for example
    0010101213---10 chars product
    0010101213S21---13 chars product
    0010101213B1225--15 chars product
    We can see the products in customs mgmnt->master data->maintain products->display.
    It is very urgent, any solution will be appreciated.
    Thank you In Advance.
    Regards,
    Anand.

    Hi Dave and Aman,
    Really Thank you very much for your reply.
    Explaining question more clear here.
    Every product will have classification right! That is happening the same here that is , I have a object  saying that 10 chars product will have some grouping{(Ex: ABCD Z) (this can be seen in the path sap menu legal->customs mgmnt->master data->maintain products->display->legal control tab)} ,for this 10 char prroduct i have to find 12,13 and 15 char products first(for example0010101213 ---10 chars product
    0010101213S21---13 chars product
    0010101213B1225--15 chars product ) and then check the grouping for these 12,13 and 15 products.
    After that if there is no grouping for these 12,13 and 15 products, i have to assign 10 char product grouping to all three types of products.
    that is the main requirement.
    If not ths is clear please let me know.
    My qyestion here is
    1) how to find 12,13 and 15 chars product for a 10 char product for example
    0010101213 ---10 chars product
    0010101213S21---13 chars product
    0010101213B1225--15 chars product
    Thank you.
    Best Regards,
    Anand

  • How to find Special Characters in a single query

    Dear Experts,
    Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
    Thanks.
    e.g.
    A_MIR
    A%SIM
    A*SIM
    A)SIM

    Hi,
    947459 wrote:
    Dear Experts,
    Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
    Thanks.
    e.g.
    A_MIR
    A%SIM
    A*SIM
    A)SIMIt's not clear what you want.
    What are "special characters"? Can you list all of them?
    Do you want to find rows where string_column contains any of the special characters? If so
    SELECT     string_column
    FROM     table_x
    WHERE     string_column     != NVL ( TRANSLATE ( string_column
                                        , 'A(%$*&@,;'/+-'
                                , 'A'
                          , 'A'
    ;I assume 'A' is not a special character.
    You could also use regular expressions, but it will be more efficient if you don't use them unless you really need to.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    You'll get better replies sooner if you always include this information whenever you have a question.

  • How to delete a character at the end of each line in a file

    Hi
    How to remove a character or symbol at the end of each line in a file?
    I am having a file with every end of line conatins special chars @.
    I need to remove or delete that sysmbol from file.
    Regards

    JoeBorland wrote:
    File is large about above 20,000 lines.
    I need to find the optimum solution.
    Like reading a file and find the end of character and writing into a file.
    The above way is correct or any other way?Try it and see. Such a program will only be a dozen lines long.

Maybe you are looking for

  • Error in Cube Deployment from Essbase Studio

    Hi All, I am very new to ESSBAE Studio. I build up a minischema, dimension element(drag and drop from minischema), hierarchy(using dimension element) , Cube Schema and Meta model. Now when I'm going to deploy the model to Essbase Console It throws er

  • Rebate functionalliy is not working properly

    Transaction to use VBO2, VBO3, VBOF I cannot make the rebates updates properly 1.The agreement  was already created by me, originally with an accrual condition of 1% of accrual. 2. I have changed the rebate with transaction VBO2. I have increase the

  • Allow anonymous login

    Is it possible to allow anonymous login but disallow anonymous searching. If its possible some direction how to achieve it. Appreciate any input. Thank you

  • Unable to provision a DS1 on a 15310MA using CTM

    Good Morning all,  When I try to provision a DS-1 on 15310MA using the DS1-84 card, we are unable to access any of the ports above port 28. on the create circuits window, tab #3. selecting the DS1 card, under the port dropdown menu. if you select DS1

  • I am unable to add songs to a playlist, what do I do?

    I am unable to add songs to a playlist.  Any suggestions.  All of the things I've previously done to add songs don't work now.