Apply Oracle Functions to Individual numeric characters in a string

I'm trying to apply MOD function and some arithmetic to each and every numeric character with-in a string. Maximum length of the string is 30 characters, and its variable length. When I try the traditional for loop, my execution time increases drastically. Here are some details:
If my string is: abc1234X-23J, I need to keep the alphabets and special characters as is, multiply each numeric by 5 add 3, apply a MOD of 10. I've done this in a function like this:
CREATE OR REPLACE FUNCTION Test1(i_Text IN VARCHAR2) RETURN VARCHAR2 IS
V_Output VARCHAR2(30) := '';
BEGIN
FOR I IN 1 .. LENGTH(i_Text) LOOP
IF SUBSTR(i_Text, I, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN
V_Output := V_Output || TO_CHAR(MOD((TO_NUMBER(SUBSTR(i_Text, I, 1)) * 5) + 3, 10));
ELSE
V_Output := V_Output ||SUBSTR(i_Text, I, 1);
END IF;
END LOOP;
RETURN V_Output;
EXCEPTION WHEN OTHERS
RETURN NULL;
END;
I need to apply this function to approximately. 4 columns, data volume is huge. I tried with 2.5 M records, in INSERT ... SELECT option, it takes 17 seconds without this function and around 6 minutes when I use this function. This is just a sample data, I would like this task to be completed with-in 30 seconds. Is there any way I can change my function or use any other option to get better performance?
Note: I tried REGEXP_REPLACE - this didnt help me, increased my execution time - I had to use native dynamic sql in this case
Tried with decode - this also didnt help.
Any expert advice is appreciated.
Thanks in advance.

SQL> select mod((l*5)+3,10), l from (select level - 1 l from dual connect by level <= 10);
MOD((L*5)+3,10)          L
              3          0
              8          1
              3          2
              8          3
              3          4
              8          5
              3          6
              8          7
              3          8
              8          9
SQL> select translate('abc1234X-23J,','0123456789','3838383838') FROM DUAL;
TRANSLATE('AB
abc8383X-38J,Hope this helps
cheers
Raj
Message was edited by: code formatting applied
s.rajaram

Similar Messages

  • Removing non-alpha-numeric characters from a string

    How can I remove all non-alpha-numeric characters from a string? (i.e. only alpha-numerics should remain in the string).

    Or even without a loop ?
    Extract from the help for the Search and Replace String function :
    Right-click the Search and Replace String function and select Regular Expression from the shortcut menu to configure the function for advanced regular expression searches and partial match substitution in the replacement string.
    Extract from the for the advanced search options :
    [a-zA-Z0-9] matches any lowercase or uppercase letter or any digit. You also can use a character class to match any character not in a given set by adding a caret (^) to the beginning of the class. For example [^a-zA-Z0-9] matches any character that is not a lowercase or uppercase letter and also not a digit.
    Message Edité par JB le 05-06-2008 01:49 PM
    Attachments:
    Example_VI_BD4.png ‏2 KB

  • Removing non-numeric characters from string

    Hi there,
    I need to have the ability to remove non-numeric characters from a string and I do not know how to do this.
    Does any one know a way?
    Example:
    Present String: (02)-2345-4607
    Required String: 0223454607
    Thanks in advance

    Dear NickM
    Try this this will work...........
    create or replace function char2num(mstring in varchar2) return integer
    is
    -- Function to remove Special characters and alphebets from phone no. string field
    -- Author - Valid Bharde.(India-Mumbai)
    -- Date :- 20 Sept 2006.
    -- This Function will return numeric representation.
    -- The Folowing program is gifted to NickM with respect to his post on oracle site regarding Removing non-numeric characters from string on the said date
    mstatus number :=0;
    mnum number:=0;
    mrefstring varchar2(50);
    begin
    mnum := length(mstring);
    for x in 1..mnum loop
    if (ASCII(substr(upper(mstring),x,1)) >= 48 and ASCII(substr(upper(mstring),x,1)) <= 57) then
    mrefstring := mrefstring || substr(mstring,x,1);
    end if;
    end loop;
    return mrefstring;
    end;
    copy the above program and use it at function for example
    SQL> select char2num('(022)-453452781') from dual;
    CHAR2NUM('(022)-453452781')
    22453452781
    Chao!!!

  • Find a non-numeric character in a string

    I have a 3 strings (1) 'AB99CDEFGH0012%' (2) 'ABCDEFGH' (3) 'ABCD11'
    how do i find out a that string has non numeric characters
    Thanks

    SELECT TO_NUMBER(:String) FROM DUAL;
    is a quick way to find out :)
    A good method would be.....
    SELECT 1 FROM DUAL WHERE TRANSLATE(:String, 1234567890, '-') IS NOT NULL;
    The statement will filter out ALL numbers, leaving behind any characters, A, B, @, ~, etc...

  • Why oracle function return 4000 characters ?

    Dear All
    When I write any function to get some return value in a query, its width is set to 4000. Moreover, when i write the same query to create any LOV, it gives an error that record group field cannot be greater than 2000. Where the actual width of this field is 200 characters.
    Why function always returns 4000 characters?
    Regards
    Edited by: OraLearner on Dec 1, 2010 11:47 AM

    Because the maximum of a varchar2 in SQL is 4000 and you have no dimension in your function:
    SQL> r
      1  create or replace function myfunc(inMaxVal in number) return varchar2 is
      2    vRet varchar2(32000);
      3  begin
      4    for i in 1..inMaxVal loop
      5      vRet := vRet || '1';
      6    end loop;
      7    return vRet;
      8* end;
    Function created.
    SQL> select myfunc(4001) from dual;
    select myfunc(4001) from dual
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SCOTT.MYFUNC", line 7
    SQL> select myfunc(4000) from dual;
    MYFUNC(4000)
    1111111111111111111111111111111111111111111111111111
    1111111111111111111111111111111111111111111111111111so the SQL Engine have to assume your function returns 4000 bytes. If you use this function in PL/SQL it can be up to 32767 bytes:
    SQL> r
      1  begin
      2  dbms_output.put_line(substr(myfunc(4002), 1,255));
      3* end;
    11111111111111111111111111111111111111111111111111111111
    PL/SQL procedure successfully completed.cheers

  • TS3276 I need feedback for the following issue. When I send email from this 27 inch iMac, the computer adds a string of characters in vertical column that represents the QWERTY key board, all alpha numeric characters are included. Yahoo mail, issue only o

    Restating my issue / question...
    When I send email from this iMac, there is a string of characters assigned. The characters are all the "alpha numeric" characters on the QWERTY key board. This only occurs when email is sent from this iMac. The issue does not manifest when using any other lap top or computer.
    Hence, I have ruled out the issue is a yahoo mail matter.
    Again, I can access the Yahoo mail account form multiple devices and send email without unintended assignment of character strings, but when I send wmail using this iMac, the issue happens everytime.
    Characters are stacked verticaly in a column. It looks as if all characters (except function keys) are included in the string.
    Any ideas?
    GMc

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. 
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below to select it:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -f -a TextEdit 
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    { sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; sudo defaults read com.apple.loginwindow LoginHook; } | open -f -a TextEdit 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3
    launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}' | open -f -a TextEdit 
    Step 4
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit  
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 5
    osascript -e 'tell application "System Events" to get name of every login item' | open -f -a TextEdit 
    Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • Safari "tel:" phone number links stripping non-numeric characters

    After a week of owning my iPhone (two weeks after it launched) I made myself a little web interface that contain various iPhone-helpful links. Four of these were AT&T specific telephone links:
    *646# - check how many minutes remaining
    *729 - pay your bill
    etc etc..
    (e.g. <a href="tel:*729">click here to pay your bill</a>)
    Well, needless to say this was a very convenient feature, however these links no longer function properly. It seems that the iPhone is now stripping any/all non-numeric characters from the link (although I haven't done extensive testing to see exactly which characters .. only with * and $ in particular).
    I've even tried HTML entities but they were stripped too.
    Now I know apple had a security fix a few patches back, one that fixed a vulnerability involving "tel:" links (CVE-2007-3755), but I haven't found any documentation regarding special characters now being ignored/stripped.
    So, my question is does anyone know if there is a workaround for this, or did the patch inadvertently and permanently destroy the ability to send these very helpful text messages via a web interface?
    Thanks,
    Marc

    I'm having a similarly annoying behavior with "tel:" links. I'm doing the same thing -- writing a web page to store some convenient numbers, but for me, it's for teleconference numbers. You dial into a toll-free number, then after a pause, dial in a passcode.
    On the iPhone's contact list, you can program in the pauses as the letter "p."
    However, in a tel: link, the p's change to 7's. Interesting!
    What I've discovered is that, for me (FW 1.1.2), alphabetical characters are translated into their numerical equivalents. So 1-800-COMCAST (a number I've had to dial all too much recently) gets rendered to 18002662278.
    This is a difference between Safari 3 and the iPhone version. On Safari 3 on the Mac, both the HTML and a mouseover shows that the tel link contains the letters. On the iPhone, though, clicking the link brings up a dialog box with the letters "translated."
    So, interesting -- but now I have a problem. How do I enter a pause into a tel link?

  • Replace Non-Numeric Characters with a Numeric Character in a String

    Hi Guys,
    I need to replace all the non-numeric characters (including embedded blanks & hyphen) in a string to a numeric character '1'.
    The trailing blanks should not be replaced.
    e.g. "P22233344455566" should be changed to "122233344455566"
    &    "49-1234567           " should be changed to "4911234567          "
    Please help.

    Use [replace|http://help.sap.com/abapdocu_70/en/ABAPREPLACE_IN_PATTERN.htm] with a regular expression to translate any non-numeric character (i.e. any character not between 0 and 9) to 1:
      REPLACE ALL OCCURENCES OF REGEX '[^0-9]' IN value WITH '1'.
    Cheers, harald
    p.s.: In older releases [translate|http://help.sap.com/abapdocu_70/en/ABAPTRANSLATE.htm] would also do the trick, but is more lengthy, because one would need to specify each individual character that should be replaced, e.g.:
      TRANSLATE value TO UPPER CASE.
      TRANSLATE value USING
          ' 1_1-1a1b1c1d1e1f1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1'.

  • Removing Non-numeric characters from Alpha-numeric string

    Hi,
    I have one column in which i have Alpha-numeric data like
    COLUMN X
    +91 (876) 098 6789
    1-567-987-7655
    so on.
    I want to remove Non-numeric characters from above (space,'(',')',+,........)
    i want to write something generic (suppose some function to which i pass the column)
    thanks in advance,
    Mandip

    This variation uses the like operators pattern recognition to remove non alphanumeric characters. It also
    keeps decimals.
    Code Snippet
    CREATE FUNCTION dbo.RemoveChars(@Str varchar(1000))
    RETURNS VARCHAR(1000)
    BEGIN
    declare @NewStr varchar(1000),
    @i int
    set @i = 1
    set @NewStr = ''
    while @i <= len(@str)
    begin
    --grab digits or (| in regex) decimal
    if substring(@str,@i,1) like '%[0-9|.]%'
    begin
    set @NewStr = @NewStr + substring(@str,@i,1)
    end
    else
    begin
    set @NewStr = @NewStr
    end
    set @i = @i + 1
    end
    RETURN Rtrim(Ltrim(@NewStr))
    END
    GO
    Code to validate:
    Code Snippet
    declare @t table(
    TestStr varchar(100)
    insert into @t values ('+91 (8.76) \098 6789');
    insert into @t values ('1-567-987-7655');
    select dbo.RemoveChars(TestStr)
    from @t

  • Problem calling Oracle function from Access 2007 / ADO

    Hopefully, I'm posting this in the correct forum. I'm also posting on an Access forum as I'm not entirely sure where the issue lies.
    I'm calling an Oracle function from Access 2007 using an ADO Command object.
    The function takes three input parameters and has a return value and an output parameter. The output parameter is a BLOB, and the return value is varchar2 (either "T" or "N") based on the outcome of the function.
    If I pass correct values to the function, I get the following error message (errs out on the command.execute line):
    Run-time error '-2147467259 (80004005)':
    [Oracle][ODBC][Ora]ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 1
    Here's the function:
    FUNCTION GET_ITEMREV_ATTACH(P_ORGANIZATION_ID IN NUMBER,
    P_INVENTORY_ITEM_ID IN NUMBER,
    P_REVISION IN VARCHAR2,
    X_DRAWING OUT BLOB) RETURN VARCHAR2 IS
    RESULT VARCHAR2(1);
    BEGIN
    RESULT := 'T';
    BEGIN
    SELECT L.FILE_DATA
    INTO X_DRAWING
    FROM FND_ATTACHED_DOCUMENTS AD,
    MTL_ITEM_REVISIONS_B IR,
    FND_DOCUMENTS_TL D,
    FND_LOBS L
    WHERE AD.ENTITY_NAME = 'MTL_ITEM_REVISIONS' AND
    AD.PK1_VALUE = IR.ORGANIZATION_ID AND
    AD.PK2_VALUE = IR.INVENTORY_ITEM_ID AND
    AD.PK3_VALUE = IR.REVISION_ID AND
    AD.CATEGORY_ID = 1001216 AND
    D.DOCUMENT_ID = AD.DOCUMENT_ID AND
    D.LANGUAGE = 'US' AND
    L.FILE_ID = D.MEDIA_ID AND
    IR.ORGANIZATION_ID = P_ORGANIZATION_ID AND
    IR.INVENTORY_ITEM_ID = P_INVENTORY_ITEM_ID AND
    IR.REVISION = P_REVISION;
    EXCEPTION
    WHEN OTHERS THEN
    RESULT := 'N';
    END;
    RETURN(RESULT);
    END GET_ITEMREV_ATTACH;
    Here's the VB code I'm using to call the function:
    Private Sub Command8_Click()
    Dim CMD As New ADODB.Command
    Dim conn As ADODB.Connection
    Dim Param1 As ADODB.Parameter
    Dim Param2 As ADODB.Parameter
    Dim Param3 As ADODB.Parameter
    Dim ParamBlob As ADODB.Parameter
    Dim ParamReturn As ADODB.Parameter
    Set conn = New ADODB.Connection
    With conn
    .ConnectionString = "Driver={Oracle in OraHome92};Dbq=OAPLY;UID=***;PWD=*******"
    .CursorLocation = adUseClient
    .Open
    End With
    Set CMD = New ADODB.Command
    Set CMD.ActiveConnection = conn
    CMD.CommandText = "immi_attach_pub.get_itemrev_attach"
    CMD.CommandType = adCmdStoredProc
    Set ParamReturn = CMD.CreateParameter("RESULT", adVarChar, adParamReturnValue, 1)
    CMD.Parameters.Append ParamReturn
    Set Param1 = CMD.CreateParameter("P_ORGANIZATION_ID", adInteger, adParamInput, 1, 6)
    CMD.Parameters.Append Param1
    Set Param2 = CMD.CreateParameter("P_INVENTORY_ITEM_ID", adInteger, adParamInput, 4, 5207)
    CMD.Parameters.Append Param2
    Set Param3 = CMD.CreateParameter("P_REVISION", adVarChar, adParamInput, 2, "04")
    CMD.Parameters.Append Param3
    Set ParamBlob = CMD.CreateParameter("X_DRAWING", adLongVarBinary, adParamOutput, 200000)
    CMD.Parameters.Append ParamBlob
    CMD.Execute , , adExecuteNoRecords *** this is where the error occurs
    conn.Close
    MsgBox CMD.Parameters("RESULT")
    End Sub
    I've tried using different data types for the varchar2 parameters (adVarChar, adBSTR, adChar) with no difference.
    If I pass a bogus value for Param3...."'04'"...the function returns "N" indicating that it actually executed something. But, when I pass the correct value "04", it returns the above mentioned error.
    I can execute the function in PL/SQL just fine, so I'm thinking there's something wrong with the parameters, datatype, or other definitions on the Access side.
    Does anyone have any thoughts? I'm at a dead end with this. Sorry for the long post. Thank you.

    I tried your code with 11107 ODBC/client/database (but with a NULL output blob for convenience sake) and got no errors.
    If you're using 92 ODBC/client, you may want to try upgrading to something more current, or at least getting the latest patch(9208) to see if that helps. Since it works for me I'm guessing it may be a resolved bug in that version.
    Hope it helps,
    Greg

  • Olap AW Invalid after applying Oracle patch 9.0.2.6

    Hi
    We have applied Oracle patch 9.2.0.6. after applied the patch we are not able to connect with AW might be all AW are invalid.
    i am getting the following error :
    ava.sql.SQLException: ORA-06521: PL/SQL: Error mapping function
    ORA-06512: at "SYS.DBMS_AW", line 18
    ORA-06512: at line 1
    at oracle.olap.awm.businessobject.aw.WorkspaceBO.getWorkspacesAttachedBySchemaUsingDML(WorkspaceBO.java:623)
    at oracle.olap.awm.navigator.node.aw.SchemaNode.getChildren(SchemaNode.java:87)
    at oracle.olap.awm.navigator.node.BaseNodeModel.refreshData(BaseNodeModel.java:74)
    at oracle.olap.awm.navigator.node.BaseNodeModel.dTreeItemExpanding(BaseNodeModel.java:221)
    at oracle.bali.ewt.dTree.DTreeDeferredParent.__fireExpansionChanging(Unknown Source)
    at oracle.bali.ewt.dTree.DTreeDeferredParent.setExpanded(Unknown Source)
    at oracle.olap.awm.navigator.node.BaseNode.expandHelper(BaseNode.java:1527)
    at oracle.olap.awm.navigator.node.BaseNode.access$000(BaseNode.java:85)
    at oracle.olap.awm.navigator.node.BaseNode$ExpansionThread.run(BaseNode.java:1488)
    Any idea or thought would be appreciable.
    Thanks
    Anwar

    Igor,
    Since you've encountered undocumented errors, your repository upgrade has failed. You'll want to leave the repository as is for troublshooting, if at all possible, and log a TAR with support if you haven't already. They'll ask you to upload your upgrade log file and your upgrade tmp directory.
    Regards

  • R12 EFT for Germany/ Using Profile ICX:Numeric Characters

    Upgrading to Oracle R12.1.1
    HP-UX 2000
    Company based in US
    Hello -
    We are trying to setup AP EFT (e-Text) payments for Germany. The amount field is being selected from:
    DocumentPayable[1]/PaymentAmount/Value
    When we run the process, the EFT file is generated correctly.
    However, the users in Germany want the Number format to be 10.000,00 so we have set the Profile option ICX: Numeric Characters FOR THE USER to 10.000,00. The Site level format remains as 10,000.00
    After making this change, NO OUTPUT FILE IS CREATED. There is no error in the log file either. Has anyone come across such a problem?
    Thanks
    Rajeev Goyal

    This problem has been solved. It was a bug in one of the Oracle programs that creates BI Extract.
    Also, please visit my blog for information on AP Check printing in Oracle R12
    http://ora12apps.blogspot.com/

  • Hibernate: Oracle function call

    Hi,
    I want to call a oracle function through Hibernate.
    Can you please tell me steps how i can achieve the same.
    What ever i have read, i am mentioning below. Please let me if i am wrong
    1. Create a class TestFunction.java having getter setter methods
    2. Create TestFunction.hbm.xml which will be having following code
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"     "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>   
    <sql-query name="callFunction" callable="true">     
    <return class="TestFunction">               
    </return>     
    { call TestFunctionSQL(?,   :Name, :Age) } 
    </sql-query>
    </hibernate-mapping>I just copy pasted the code from some website and modified as per my need. Please let me know if anything is wrong above.
    3. I need to put the entry of TestFunction.hbm.xml in hibernate-cfg.xml
    4. I need to put the code in java to call teh stored proc. I dont have any idea how to do that.
    Please help
    ~Aman

    Before beginning : sorry if my answer isn't relevant but you asked no clear question
    I don't know a lot about it, even if all looks fine to me...
    the way to call a named query in hibernate is:
    List l =session.getNamedQuery("callFunction")
        .setString("param1", param1)
        .setString("param2, param2)
        .setMaxResults(50)
        .list(); // named parameters are betterSEE: http://www.hibernate.org/hib_docs/v3/reference/en/html/querysql.html
    specially $16.2 and $16.2.2
    //extract
    For Oracle the following rules apply:
    * A function must return a result set. The first parameter of a procedure must be an OUT that returns a result set. This is done by using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle you need to define a REF CURSOR type, see Oracle literature.

  • Sorting of alpha numeric characters in a column`

    Hi All,
    I have a column which has alpha numeric characters like 1A, 12B, 14D, 12CC ...etc.
    I need to sort this column in ascending as well as descending. The normal "sort by" does not work and the ASCII function return on the ascii value of the 1st character in the cell.
    Can you please help me out?

    Needed more sample data..
    For provided data, ie if Number comes only at the beginning, you can ..
    SQL> select c1
      2  from t
      3  order by to_number(translate(c1,translate(c1,'a0123456789','a'),' ')),c1;
    C1
    1A
    12B
    12CC
    14D                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • XML Error while calling webservice from oracle function.

    I am getting an error while I am trying to call webservice from oracle function. Any ideas? Thanks.
    select get_new_string ('proxy:80', 'http://xxx/PatternVariations/SourceTest/WebMethods','Scott') from dual
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00225: end-element tag "H4" does not match start-element tag "P"
    Error at line 9
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at "DORSBP00.DEMO_SOAP", line 82
    ORA-06512: at "DORSBP00.GET_NEW_STRING", line 11

    The error message implies that the web service is returning something that is not well formed xml. Can you verify what is being returned by the web service call

Maybe you are looking for

  • Can´t open photos in iphoto

    I see all of my pictures, but when I try to open a picture in iphoto I only get a exclamation up!!....     what can I do and fix it?

  • Security in ADF

    Jdev version 11.1.1.6 I have created an ADF application. I have created the page flows in adfc-config.xml. I want to include security features in my application like disabling the Back button of the browser, session timeout, invalid session etc. User

  • When moving from LR4 to PSE9 editor my photos look very different

    I've recently bought lightroom 4 which I'm using with elements 9 and I know that lightroom 4 will slightly alter the look of photos previously edited in elements which hasn't been a problem so far.  My problem is that photos edited in lightroom/devel

  • RFC Lookups API

    Hi Experts, Can you please share with me the following document on XI Mapping lookups RFC API by Michal [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf] the

  • JPopup and System Tray icon

    Hi there, I have a problem with my appl. May ý ask you? I made a jpopup for using both menu in window and in system tray icon. I used trayIcon.addMouseListener(new MouseAdapter() {         public void mouseReleased(MouseEvent e) {             if (e.i