REGEXP_REPLACE return strange results and eliminating duplicate characters

I try using REGEXP_REPLACE to remove all the characters that is not a letter or a number, but I get strange results. It seems to eliminate duplicate characters. The result varies also with the order of the boss. How can I solve this?

SELECT REGEXP_REPLACE(p_str,'[^[:digit:]][^[:alpha:]]','.') FROM (SELECT 'AAA bb' double p_str);

> AA.bb

SELECT REGEXP_REPLACE(p_str,'[^[:alpha:]][^[:digit:]]','.') FROM (SELECT 'AAA bb' double p_str);

> AAA.b

Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production

to remove all characters which is not a letter or a number

You can try (it's more flexible for alphabets and numbers)

[^ [: alnum:]]

See you soon,.

Manik.

Tags: Database

Similar Questions

  • SQL query return different result 11 GR 1 material and GR 11, 2

    Problem: SQL returns different results in 11 GR 1 material and GR 11, 2 games.

    Example script:

    create the table tab_main
    (
    SOS number (2) not null,
    contract number (2) null
    )
    /

    create the table tab_sub
    (
    number (2) of contract non-null,.
    SOS number (2) null
    )
    /

    insert into tab_main values (1, 10);
    insert into tab_main values (2, 20);
    insert into tab_main values (3, null);
    insert into tab_main values (4, null);

    insert into tab_sub values (1, 10);
    insert into tab_sub (20, 2) values;
    commit;

    The SQL code:

    SELECT *.
    OF tab_main.
    tab_sub
    WHERE tab_main.sos = tab_sub.sos (+) AND
    tab_main. Contract = tab_sub.contract (+) and
    tab_main. Contract not in (select 1 of the double);

    The above query gives more results
    -by 11.2.0.4
    1 10 10 1
    2 20 20 2

    -in 11.1.0.7
    1 10 10 1
    2 20 20 2
    4
    3


    Please tell us what could be the reason for the behaviour of offset lines thie.


    Thank you

    Piesset

    I think it is probably a bug in 11.1.0.7 (and possibly other versions), I get the same results as your 11.2.0.4 9.2.0.7, 10.2.0.3 and 11.2.0.3, and this is the result, I expect.

    Your not in the paragraph is equivalent to:

    SELECT *.

    OF tab_main, tab_sub

    WHERE tab_main.sos = tab_sub.sos (+) AND

    tab_main. Contract = tab_sub.contract (+) and

    tab_main. Contract <> 1;

    Since you have null values in tab_main.contract they are lost by the predicate since null = value is never true (or false).

    John

  • Dequeue Business event (AQ or AppsAdapter) in OSB and the return of results fails

    I'm new to OSB. The scenario is to publish the results on SFDC (SalesForce.Com) all changes in EBS.

    Works well within the OSB. However when I try to return the results back... It is a failure. What is wsdl has only a structure of entry

    and does not have an output structure?

    I finally got this working. I thought incorrectly that the XSD and WSDL will have to be changed to create output Structure.

    You don't have to change the head of series dequeue XSD/WSDL

    It actually changes caused the problem.

    One of the errors I got was

    The SOAP envelope contains one or more body elements that cannot be mapped to the WSDL elements ({http://xmlns.oracle.com/xdb/APPS/ReceiveEvent} WF_EVENT_T).

    com.bea.alsb.ws.codec.CodecException: the SOAP envelope one or more body elements that cannot be mapped to the WSDL elements ({http://xmlns.oracle.com/xdb/APPS/ReceiveEvent} WF_EVENT_T).

  • Seizure of returns and other special characters

    Greetings,
    I'm curious about what happens 'normally' to capture of returns and other special characters in textareas. I want my user to be able to insert characters of 'control' in the text box to enable them to provide a structure to information, enter. For the moment, I'm processing text char by char and working out if it's a 'go' or whatever, then by adding a ' < br / > ' to the string before I record it and so on.

    Is there a more established way to do this kind of thing?

    Use replace to replace Chr (10) or Chr (13) with a break tag. It uses cold fusion functions to accomplish the same thing as you seem to do it manually.

  • inner join is not eliminating duplicates!

    Name of the table is customers

    VALUE CITY SIDE NUMS CNAME
    1 2001 Hoffman 100 1001 London
    2 Rome 2002 200 1003 Giovanni
    3 2003 Liu San Jose 200 1002
    4 2004 grass Berlin 300 1002
    5 2006 Clemens 100 1001 London
    6 2008 Cisneros San Jose 300 1007
    7 2007 perish Rome 100 1004

    Query is
    To find all pairs of customers having the same side

    I tried:

    SELECT c.cname, cb.cname FROM customers c INNER JOIN customers cb WE cb.rating AND c.cname = c.rating! = cb.cname

    CNAME CNAME
    1 perish Hoffman
    2 Clemens Hoffman
    3 Liu Giovanni
    4 Giovanni Liu
    5 Cisneros grass
    6 perira Clemens
    7 Hoffman Clemens
    8 grass Cisneros
    Clemens 9 perish
    10 Hoffman perish


    Ideally, it should up to 5 rows, but it does not return these lines for an e.g. Hoffman perish since I'm Perira Hoffman already. Your answers will be appreciated.

    Thank you
    Vaibhav

    Hi, Vaibhav,

    914683 wrote:
    Name of the table is customers

    VALUE CITY SIDE NUMS CNAME
    1 2001 Hoffman 100 1001 London
    2 Rome 2002 200 1003 Giovanni
    3 2003 Liu San Jose 200 1002
    4 2004 grass Berlin 300 1002
    5 2006 Clemens 100 1001 London
    6 2008 Cisneros San Jose 300 1007
    7 2007 perish Rome 100 1004

    Query is
    To find all pairs of customers having the same side

    I tried:

    SELECT c.cname, cb.cname FROM customers c INNER JOIN customers cb WE cb.rating AND c.cname = c.rating! = cb.cname

    Perhaps what you want is

    SELECT      c.cname
    ,         cb.cname
    FROM          customers  c
    INNER JOIN  customers  cb  ON   c.rating  = cb.rating
                                       AND  c.cname       < cb.cname     -- not !=
    ;
    

    CNAME CNAME
    1 perish Hoffman
    2 Clemens Hoffman
    3 Liu Giovanni
    4 Giovanni Liu
    5 Cisneros grass
    6 perira Clemens
    7 Hoffman Clemens
    8 grass Cisneros
    Clemens 9 perish
    10 Hoffman perish

    The title you chose for this thread is "inner join is not eliminating duplicates!
    Inner joins (or other types of joints) are not supposed to remove duplicates. Use SELECT DISTINCT to remove duplicates, which is exactly the same lines.
    You don't have to duplicate. For example, these lines of your result set:

    `        CNAME     CNAME
    1     Perira     Hoffman
    10     Hoffman     Perira
    

    are not identical; Indeed, the two columns are different.

    Ideally, it should up to 5 rows, but it does not return these lines for an e.g. Hoffman perish since I'm Perira Hoffman already.

    Please report the exact output of the sample data you want. (As said by Hoek, post CREATE TABLE and INSERT statements for the sample data too.)

  • Strange results in "organize bookmarks".

    Hi people,
    I'm having a strange result when I opened "Organize Favorites".
    I do not get the actual list, but rather, only 3 URL in the right pane (name, etc.) and Nothing in the left pane.
    I have topped up the bookmarks via the function "Import/Backup" from 2 different sources, I use to back up important applications and files, both with the same results. Namely an external hard drive and a USB key. And, Yes, I always check these files with applications of virus, malware and software spies/bot after save it!
    Any ideas there? I have several years to build these bookmark and I go nuts trying to go up this list! < VBG >
    I have a screenshot of this mess that can be seen at:
    Favorite screenshot (Please hold down the CTRL key to see in a new tab)
    Thanks in advance... Mark

    This may be a problem with the places.sqlite file that stores the bookmarks and history.

  • Generate and write unicode characters to file

    The characters of genearted seems OK (up to x00FF), but after writing to file these characters and their values are different. Also the characters after 0x00FF are not good.

    Any idea?

    You should probably give this page than to read a thorough if you relied on the use of Unicode in your application.  Here is a relevant excerpt:

    ASCII technically only sets a value of 7 bit and can therefore represent 128 different characters, including characters such as the newline (0x0A) and return (0x0D) transport. However ASCII characters in most applications including LabVIEW are stored as 8-bit values which can represent 256 different characters. The 128 additional characters in the ASCII range are defined by the code page of the operating system aka "language for programs non - Unicode.  For example, on a Western system, Windows uses by default the character set defined by the Windows code page 1252 Windows-1252 is an extension of another commonly known used encoding ISO-8859-1.

    Offers Windows-1252 characters up to 0xFF (ÿ) but not something higher to 8-bit (for example no 0x0100).  By default, LabVIEW support these uses of 8-bit, multibyte strings characters - only interpretation is based on the current code page selected in the operating system.  You can turn on Unicode, the instructions in my first link (this is not supported and can be a little buggy from time to time...) to get the support of multibyte unicode characters to multibyte codepage characters not in the operating system.

    Unicode has several encodings, and the bit raw to a character depending on the encoding used.  LabVIEW limited unicode support seems to use UTF-16 (little endian) encoding for whatever it will be displayed in the user interface.  So to get the characters displayed on the interface user, you must enable unicode (instructions illustrated in my first link) and write the appropriate UTF-16 code:

    UTF - 8 is more common and therefore easier to work with outside LabVIEW (e.g. my version of Notepad ++ obviously do not support UTF-16).  I usually find myself using UTF-8 for files format strings and convert them to UTF-16 for display in LabVIEW.

    Unicode in my first link library has the necessary subVIs to convert between UTF-8 and 'Unicode' (i.e. UTF-16).

    Best regards

  • Research component returns incomplete results

    The search pane always returns incomplete results.  For example, to find all files that have been changed since April 8.  Several files are returned-, but two files I modified TEN MINUTES ago aren't.  And who knows how many others were not returned.

    How does search pane decided not to include files which should, and why?  What is the solution to make it work properly?

    If you have any Google products installed on your system, they can take over functions normally performed by Vista (in this case, the advanced search function).  Google does (and sometimes without warning or notification).  You should be able to access the Vista advanced search function by pushing the search button in the Start Menu (assuming that Google has not only taken over as well).

    Thanks for the comments!

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How can I return a result of popup to parent form

    Hi guys

    This is probably a very simple question.

    How can I return a result of popup to parent form?

    Thank you

    Hi dpolonsky,

    due to the fact that your screen popup and parent are in classes separated.

    So create your own set and get methods/functions that can be called from another class.

    Because the variables are known only in the class, they were defined (information hiding), then you must use the functions/methods, that affects the apropriate values.

    in your parent class, you can define a method like:

    void setFromPopup (int intval) {}

    intval = globalintvalfrompopup; globalintcalfrompopup is declared globally within your class

    }

    and in your child (popup) class, you can call via

    .

    .

    int TestInt = 10;

    parentclass.setFromPopup (testint);

    .

    .

    It is a general question of JAVA.

    Hope it helps.

  • How to find and remove duplicates?

    How to find and delete duplicate files?

    Hello

    Are what duplicate files you referring?

    I suggest you follow these steps:

    a. open search by pressing the logo Windows + F key.

    (b) in the search box, type the name of the file that you suspect could be duplicated.

    c. in the toolbar, click view and then click on details.

    d. scroll down the list, looking for files with the file names and file extensions. When you find one or more of the files that match, compare their dates in the Date Modified column. If the dates are the same, the files are probably duplicates. You can open files and compare their contents to be sure.

    e. search files that are probably double results

    f. click on the file you want to delete and press DELETE.

  • OBIEE logical column has same SQL but returns different results

    I have a SQL query with a case statement that returns the correct results by operating in Oracle SQL Developer. I've created several logical columns in OBIEE, one for each case in the original query. However, the results returned by each logical column OBIEE are radically different from the original SQL query results, even if the SQL code is virtually identical.

    For example, a column logical OBIEE that returns incorrect results contains the following SQL code:

    SUM (CASE when

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '% a %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%B %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%c %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like"% %") or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%G %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like"hour %") or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like"%%J") or

    ("Registration - College". "" Effective colleges F. ("' Postal code ' like '%R %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%s %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%T %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like"% %") or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%x %') or

    ("Registration - College". "" Effective colleges F. ("' Postal code ' like '%Y %')

    THEN 0 OTHERWISE 1 END)

    The case statement in the original SQL query, which returns the correct results, is as follows:

    CASE

    WHEN (postal_zip_code_permanent like "%%K") or (postal_zip_code_permanent like '% %') or (postal_zip_code_permanent like '%m %') or (postal_zip_code_permanent like '%n %') or (postal_zip_code_permanent like "%p %") THEN "Ontario".

    WHEN (postal_zip_code_permanent like '% a %') or (postal_zip_code_permanent like '%B %') or (postal_zip_code_permanent like '%c %') or (postal_zip_code_permanent like '% %') or (postal_zip_code_permanent like '%G %') or (postal_zip_code_permanent like "%hour") or (postal_zip_code_permanent like "%%J") or (postal_zip_code_permanent like "%%R") or (postal_zip_code_permanent like '%s %') or (postal_zip_code_permanent like '%t %') or (postal_zip_code_permanent like '% %') or (postal_zip_ code_permanent like '%x %') or (postal_zip_code_permanent like "%%Y") THEN "Canada, other than Ontario.

    WHEN (substr(postal_zip_code_permanent,1,1) IN ('1 ', '2', '3', '4', '5', '6' ', 7',' 8 ', ' 9',' 0') or (postal_zip_code_permanent like '%d %') or (postal_zip_code_permanent like '%f %') or (postal_zip_code_permanent like ' % I %') or (postal_zip_code_permanent like "% O") or (postal_zip_code_permanent like "%%Q") or (postal_zip_code_permanent like "%%U") or (postal_zip_code_permanent like ' % W ') or (postal_zip_code_permanent like "%%Z")) THEN 'other')

    WHEN (postal_zip_code_permanent like '% + %') or (postal_zip_code_permanent like '%. %') or (postal_zip_code_permanent like ' %? %') or (postal_zip_code_permanent like '% %') or postal_zip_code_permanent IN ('+ ','.', '?)) (',',') And THEN "Invalid."

    WHEN postal_zip_code_permanent is null THEN 'Blank '.

    Of OTHER postal_zip_code_permanent

    END

    Now I see what the problem was. In the original SQL query, each condition is exclusive, for each record will only be categorized in one of the scenarios WHEN. But in OBIEE, each logical column is autonomous, so some records were classified into more than logical column, even if each logical column was supposed to be exclusive.

  • Return custom results, the value of the service

    Hi all

    Can return us customized results, the value of a personalized service?

    We plan to write a wrapper for the Service of research and return the result set custom when that service is called. Any body tried this approach before and do you know what are the advantages and disadvantages of this approach.

    1. resources Service file. CheckReleaseState is the personal name of resultset.

    2 file query of the resource.

    Run your custom service and then access the resultset in java using the line below:

    DataResultSet searchDataResultSet = new DataResultSet();

    searchDataResultSet.copy (binder.getResultSet ("CheckReleaseState"));

  • PLSQL function to return the result of the query

    Dear all,

    Oracle Database SE1 11.2.0.1

    I need to create a plsql function which should accept SQL as a parameter, execute it and return the result set.

    Is this possible?

    Madhu.149 wrote:

    I need to create a plsql function which should accept SQL as a parameter, execute it and return the result set.

    Be careful - results games indicate a set of data stored in memory. This is not what are sliders. This isn't how Oracle should be used.

    Imagine that you implement such a result set function - which, on average, requires 1 MB of memory (private server) to store the results of the SQL query. A 100 users mean a 100 MB of memory required server. This is not suitable. Not at all. Never.

    The correct back 'thing' is a handle to SQL cursor (called a ref cursor in this case). A SQL cursor is a "program" - that the appellant runs via the fetch command and generates one or more lines accordingly. Appellant repeatedly runs this slider through calls to fetch until this slider found and returns all rows affected (using consistent readings).

    If you want an abstraction interface that the client can call via PL/SQL code in the database, so this crafting optimal SQL interface, creates the SQL cursor and returns the handle of the cursor (via the ref cursor data type) to the client.

  • Data connection to the interactive form returns no results

    I have an interactive form of Adobe with a data connection that calls a function module compatible SAP rfc.  The call works fine, but it must return a value in the data connection response.  I know that the function module is feeding the return variable and binding form field to the answer is correct, but it never shows up.  We are on Live Cycle 9.0, with SAP EHP7.  Wsdl and soap links all look good. I tried data as "ordinary" connections and "run", used the two text fields of hierarchy and directly by dragging the data finds the response to the form field.  I played with various permutations to the soap and wsdl url.  The value of the response is necessary so that the user sees the result of the action (triggered by a button on the form).  Don't know what else to try.  As I said, the call to the SAP function module works fine, it's just the answer that I can't go back to the form. Any help to fix this would be greatly appreciated.

    I finally solved the problem myself.  Looks like a bug to me.

    In my interactive form, I have a button associated with the data EXTRACT connection that calls a function module compatible rfc in SAP called Z_LEMS_EXTRACT.  This function module returns a result of string called E_MESSAGE.

    The returned E_MESSAGE is then bound to a form text field.

    The generated XML defines the link as

    Z_LEMS_EXTRACTResponse\. E_MESSAGE

    I had to manually change the xml code for

    Z_LEMS_EXTRACT\. Response.E_MESSAGE

    This was determined by referring to another interactive form that was created in a previous version of Live Cycle Designer and a previous version of SAP, he used "\Response." and worked properly.  So I applied the same coding here and it works.

  • After the merger of 7 shots in panorama, it took about 5-6 minutes to get the end result and the result had only something above 1000 pixels.

    After the merger of 7 shots in panorama he tooks nearly 5-6 minutes to get the final result and this result have only something above 1000 pixels edge long photo resolution? Why is this happening? I've been fusion 7 24Mpix of Nikon D750 RAW files. I saw a promo video where he introduced and there the panorama was above 10 000 pixel wide, so it is not a limit of lightroom, but something is not. Maybe some strange décor? Thank you.

    Well, the good news is... This isn't your files.

    I produced a pano 17310 x 6039 in less than 3 minutes. With or without adjustment.

    The only differences that we have so far is the platform. Mac/Pc

    Wrong guess you managed to repeat the question. Maybe a reinstall?

    I hope that someone else (on PC) may be able to provide alternative suggestions. Let us know if you yourself are able to find a solution.

Maybe you are looking for

  • How to find and remove spyware strikes from an iPhone?

    I worked for a short time at a small company a couple of years.   I left when I become convinced that they have been systematically spy on employees.   Since they have insisted that we all use our own phone / computer, I suspect that they installed s

  • Cannot write negative values on server modbus on cRIO 9068

    Hello everyone, I'm moving a project from a platform of 9114 cRIO a cRIO9068, the reason for a difference of heavy in terms of power CPU, memory, performance FPGA etc... Real time I deploy a modbus TCP server, and I publish just I16 data. The problem

  • history of exe parameters

    Hi all My (test prior to employment) mission is to reproduce the operation of Conversion for Windows in LabVIEW.  The convert to Windows .exe opens with the settings of the previous run list box (there is NO .ini).  It is my understanding that exe ca

  • the procedure entry point SMapS_IP_EBP_12 be found in Kernel32.dll dynamic link library.

    I am trying to load an older game on windows 7 and the above error message is what I get when I click on the icon of the downloaded... does that mean and how can I solve this problem

  • Sony TRV 280 iLink troubleshooting

    When I try to download video files from the band from Handycam to my laptop that is running Windows Vista, I get no error of compatible device. The pop-up window appears on the computer screen asking which program to use when I turn on the camera, bu