Case sensitive and independent research of / and update entries in double in Oracle 11 g

Hi all

This is my first time posting a question on any online support community. So please excuse my spotty label on this issue.

I am using Oracle 11g and am faced with a dilemma.

I have a table named POINTS as below:

ID NAME IS_TYPE
1Chair1
2Chair1
3Chair1
4Chair

1

5CHAIR16Table17Table18Table19Table110Auto_Info111Auto_Info112Auto_Info113Auto_Info114Auto_Info1

As you can see, the items 'flesh' and the 'table' have duplicates with different bodies. And what I have to do is find a way to harmonize the body and also add a number at the end of each duplicate item. The thing is, this should be done ONLY to the duplicates that differ in the envelope. If the Auto_Info entry should not be affected in some way. The result should look like this:

ID NAME IS_TYPE
1Chair1
2Chair 11
3Chair 21
4Chair 3

1

54 Chair16Table17Table 118Table 219Table 3110Auto_Info111Auto_Info112Auto_Info113Auto_Info114Auto_Info1

What I have so far:

I spent a lot of time trying to internet search and the merger of what I find a solution. So far I've been able to find a way to extract duplicates with different case from the rest of the table in the following way:

ALTER session set NLS_COMP = ANSI;

ALTER session set NLS_SORT = BINARY_CI;

SELECT NAME

ELEMENTS

GROUP BY NAME

LESS

SELECT NAME

ELEMENTS

GROUP BY NAME

After HAVING COUNT (1) > 1

I am very new to databases and help with this problem would be highly appreciated.

Ok.

You can use a MERGE statement to do next:

SQL > fuse the elements I

2 using the)

3. Select rowid as i_rowid

4, Chief (distinct name) over (partition nlssort (name, 'NLS_SORT = BINARY_CI')) as cnt

5, row_number() over (partition nlssort (name, 'NLS_SORT = BINARY_CI') order by id): the nurse

6 items

(7) v

8 on (i.rowid = v.i_rowid and v.cnt > 1)

9 when matched then update set i.name = initcap (i.name) | ' ' || TO_CHAR (RN)

10;

9 lines merged.

SQL > select id, name from the elements;

ID NAME

---------- ---------

1 Chair 1

2 Chair 2

3 3 Chair

4 4 Chair

5 5 Chair

6 table 1

7 table 2

8 table 3

9 table 4

10 Auto_Info

11 Auto_Info

12 Auto_Info

13 Auto_Info

14 Auto_Info

14 selected lines.

SQL > commit;

Validation complete.

Don't forget the VALIDATION to the end in order to validate the transaction.

Tags: Database

Similar Questions

  • 'Find' is case-sensitive and the option does not appear on the search bar

    As I said, it is case sensitive. I looked for an answer and everyone says uncheck case-sensitive on the search bar, but he's not here. I am on a mac with os x 10.9.4 using Firefox 32.0.1.

    I thought about it. I had to restart with disabled addons. I don't know which extension caused the problem, but the change stuck when I re-enabled the addons.

  • the sensitive search case sensitive and non-respect of case-sensitive

    Hello!

    We are with 11g enterprise edition for our product. In the past, we used the LIKE operator to search for our fields of type string. So, we had an index of based function (UPPER (stringfield)) for non-respect of the case. and an index of second normal for a case sensitive search

    Now, we want to use the oracle for the search text option (best performance, search for similar words,...). How work with case oracle text and no respect for case-sensitive?

    As far as I know, I can set a lexer and set a property to deal OR not to case... But I need two... Do I need 2 text totalisators?

    Thank you
    Markus

    Yes, that's correct.

  • Insert and update records to MySQL from Oracle

    Hello

    Our application will be insert/update new records in the Oracle database, but I need to insert/update new records in the MySQL database. Oracle and MySQL tables have the same columns.

    Right now, we intend to create DBLink between Oracle and MySQL. The question is to know how to write code to insert/update new records to MySQL from Oracle. I'm a new guy in this area.

    Please give us some examples of code, thanks!

    With Oracle, you should be able to just write the same thing as usual, except for the include link database when you reference the table for example your SQL

    insert into tablename@mysqldblink...

    updating of the game tablename@mysqldblink...

    Services gateway through the database link (odbc drivers or anything else that is used) must make the most of the necessary conversions for you.

  • Histogram maintenance and update details

    Hello

    I would like to learn more about histograms. A TOAD, when you see the table definition,
    It shows a column called histogram. In my understanding, it is updated when
    the underlying table is analyzed.

    I want to know some more stuff on this subject, please explain.

    (1) at which display the metadata, TOAD. retrieves this information, it is not available in
    USER_OBJECTS, USER_TABLES.

    (2) is it updated during any event?

    (3) contain any other information apart from the details of the Distribution of the data
    who will seize when you use the Index in the underlying table, thank you.

    Analyze and update the histograms. http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_4005.htm

  • Search text documents case-sensitive records

    Vista support case-sensitive text searches for records?  If so, how?

    Thank you

    Hello viper158,

    Content research are focused on the floor, are not case-sensitive and cannot be made so. However, capital letters or characters of punctuation in the words are considered as starting a new Word and can be found. For example, a search for "hop" returns files that contain Hip Hop HipHop or hip hop but not Hiphop.

    Mr. Doug in New Jersey

  • Photoshop CS6 (extended) installation on case-sensitive disks

    I understand that under the "requirements" of the Adobe Web site says you can't install PS CS6 (Extended) on the case-sensitive drives (I use a MacBook Pro, OS X v. 10.7.4).  This seems to have been the case at least since CS5.

    I did not see this, and I bought (excitedly) update CS PS5 (Extended) to SP6.  I had NO PROBLEM installation PS5 on this drive.

    Of course, as others have said, the installer refuses to allow you to install on a case-sensitive drive (for example, no options to install on another drive).  There is also no mention that CS6 must be installed on the boot drive.

    Requiring installation on the boot drive has serious implications for those of us who need readers sensitive to other work; I don't want to have to restart on another drive when I use PS and switch back and forth - it's all just stupid.

    From my point of view (as a user, granted), this is lazy programming, and this must be resolved as soon as POSSIBLE.  At least in my case, I have a piece of a $400 software just too place, when I want to be up to my eyeballs enjoying PS6 throughout it's fame.

    Outside an Adobe fix, I don't see a solution to this problem.  If I wipe my drive, put in shape in case-insensitive, then I lose the functionality for other critical work.  In addition, I'm not sure the process of wiping the disk, formatting it not sensitive to case and restore TimeMachine everything would be even work (since the backup hardware is from a case-senstive drive and try to go to a drive that is not case sensitive).

    The REALLY frustrating part is that I have installed Photoshop 3, 4 and 5 (and much, much further) on the casing of the disks - all with no problem.  It is only now that the question slap me in the face.

    It has to be a work around, if not a 'real' solution.

    What help you might be able to offer would be greatly appreciated; details can be sent to cdretk at gmail dot com

    I hope, and I thank you in advance.

    Now I solved it (no thanks Adobe, who I am very disappointed).

    In the past, when you wanted to install something on your Mac, you simply copy a folder in your Applications directory.

    Photoshop (among other programs) got more complicated, it is decided that it must install things in the different system directories and potentially in your user directory.

    That is the question (and the solution, in this case).  My user directory is on the drive that is case-sensitive.  I don't know what Adobe needs to install (as Photoshop is, after installation, available to all users), but this has been the key.

    SOLUTION: Log on as another user (administrator-enabled) and install it.  Bang - it works without any problem.

    Yes, I still had to copy all my plug-ins, etc. of the PS5 by hand (and sort those SP6 is not like - once again at hand), but at least it works.

    Good software engineering practices dictate that installed software should PREFER discs case-sensitive and not case insensitive (think of the data).

    Good installation support (on the phone) should at least suggest trying another user account...

    Adobe: You owe me for my time on this one.  Where should I send my invoice?

  • Password case sensitive of 11G + DB Vs Oracle 10g reports

    Dear Experts,

    Currently, we have migrated our database 10g R2 to 11g R2. 11g when using the password is case-sensitive and our password is the mixture of upper and lower charecters.

    Our Oracle application server version 10g R2. When we call the report from oracle forms its doesn't open is not the page.
    In queue in the report it shows as completed with error: REP-501: unable to connect to the specified database.
    But if we keep our db 11g password all higher report runs correctly.

    Where I have to change to have upper and lower as db 11g and 10g reports.

    This is the right place to post this thread here or I have to post under reports.

    Please help us.

    Kind regards
    Barry M

    Maybe it helps Re: 10.1.2.3 and RDBMS to Oracle 11g R2 forms

  • independent research case and accents

    Hello
    I'm new on PL so sorry if it shows with the post :). I'm doing a Research independent of case and accents in the Apex without the help of the upper and lower functions. I found nlssort to solve this problem, but I don't know if I'm doing something wrong or can't do.

    nlssort works very well when it is used like this:
    select *
    from Items_V
    where nlssort(Name,'nls_sort=spanish_ai') like (nlssort(:P5_Name,'nls_sort=spanish_ai'))
    what I also need is results that contain the name and in addition to that a case in the where clause.

    The following code is what I have now and _where I want to include the nlssort_. It returns all the items containing Null values and P5_Name or correspondence.
    select *
    from Items_V
    where  ((Name like (case when to_char(:P5_Sel)='1' then nvl('%'||:P5_Name||'%','%' )
                             else '%' end)
            and Name is not null) 
            or ((case when to_char(:P5_Sel)='1' then nvl('%'||:P5_Name||'%','%' )
                     else '%' end) ='%' and Name is null))                     
    I tried many ways, but I just can't get the right combination and don't really know where to go. Try starting with a simpler approach, I found this concatenation + '%' + nlssort(:P5_Name,'nls_sort=spanish_ai') was not returning items contained, only items that match.


    Thank you in advance,
    Marc

    BTW, I develop on:
    DB 11g
    Request Express 3.1.1.00.09

    a common need for which I have not found another way to solve: independent research case and accents.

    How about smth like (assuming you're on 10g or more):

    SQL>  var p5 varchar2(50)
    
    SQL>  exec :p5 := 'ae'
    PL/SQL procedure successfully completed.
    
    SQL>  with t as
    (
     select 'Âero' str from dual
    )
     select * from t where regexp_like(convert(str,'us7ascii'), convert(:p5,'us7ascii'),'i')
    
    STR
    ----
    Âero
    1 row selected.
    
  • Case-sensitive option in find and replace the chain

    Hello!

    Attached is my problem.

    I'm looking 'toto' in the 'toto + tototi' input string and replace 'toto' by 'A0 '.

    I want to "respect" the input search in order to get a string result: A0 + tototi

    Are there options allowing for case-sensitive option?

    BR,
    Vincent

    You use search and replace with Regular Expressions selected (the little asterisk icon).  \b represents a word boundary, basically the imaginary space between the character is a letter, number or underscore, and the other is not.  In other words, it is an assertion of width zero, which means that \b does not capture anything.

    For example: toto is toto, toto1, toto_1 etc.  toto\b matches the string 'toto' when it is followed by something that is not alphanumeric or underline, is why it will not match toto1 but will match toto + or 'toto '.

    Go to pcre.org for more information or follow the assistance detailed in LV I assumed you knew because you need to turn on Regular Expressions in S & are so I assumed that you had done.  You've probably done without being aware of what you were doing.

  • Entity and attribute transformation of names (case-sensitive) to the relational model

    Hello

    For the names of entities and attributes, I would use camel casing, e. g. AccessRightGroup (or the right access group) and its translation to the relational model in the Table name access_right_groups. I found, I can do in the entity properties > General > abbreviation preferred by writing the name of the table you want in this area. But I guess that there is a more elegant way by setting that breaks are transformed into small capital and underlined and entity (set) becomes plural as table. Is there such a possibility?

    How that would make the camel case attributes?

    Best regards, Robert

    Hi Robert,.

    case-sensitive, you must set 'Title case' as a separator for logic model in the design properties dialog box "settings > naming standards '-c' is for this form of the names AccessRightGroup; for group of access rights that you need not change anything - the default separator is set to 'space '.

    For the plural in the relational model, you need a glossary with defined plurals - however it only works for the entity name unique term. I logged an ER to change this.

    Tiny in a relational model - well you must set to relational model - in the Properties dialog box - "(Naming options > Table, cas de caractères...-mis à baisser et le nom sera mis dans cette affaire àle cours de la transformation) - otherwise you always can use the script provided with Data Modeler to convert the names of all the lower/upper cases."

    Phhilip

  • Why I can't install CS6 on case-sensitive drive? And how do I get around it please?

    I get a type 22 error message when I try to install the CS6 software. It says that it cannot install on case-sensitive drives, so how do I get around this please?

    Error "No supported drives case-sensitive" or similar facility. Mac OS

    Mylenium

  • I have to ios9.3.3 a 6s and updated iPhone and cannot retrieve old messages

    I have a 6 s iphone and updated to 9.3.3 iOS and now cannot retrieve old messages. I receive mail. I have not updated my ipad and can't receive old emails on this bequest is

    It is a POP email account? Have you set up things so that the device stores messages on the server for a certain period or until you remove them? If this isn't the case, message may have been deleted once delivered, so cannot be delivered again. See get help if you have any questions using a POP with multiple devices - Apple Support email account.

    TT2

  • Why is able to save and update the passwords for sites other than those of Blackboard FF?

    I am able to save and update passwords on other sites, but not on the Blackboard learn for my University. They force us to change our pw is from time to time, and I think I noticed it after that Blackboard did some updates to their site. It will always load autofill with my old account and password, but not update it. I deleted the password stored and tried to get FF to remember once again on my laptop, but it has not yet asked to save him. I'm guessing that there is a new code or a script for the journal in the procedure? Is there a manual way to enter and update the credentials stored?

    Hello, sites can specify that passwords should not be stored (however I do know that if this is the case on the page you are having problems with, since you did not specify which University it affects). as a way to get around this, you can use an addon like this: https://addons.mozilla.org/firefox/addon/remember-passwords

  • OSX 10.11.2 on end of 2008 with the graphic card Nvidea Quadr 4000 MacPro is unable to open the Nvidea driver manager in System Preferences, CUDA work and updates. Any suggestions? Have tried to install updtyer Combi for OSX.

    OSX 10.11.2 on end of 2008 with the graphic card Nvidea Quadro 4000 MacPro is unable to open the Nvidea driver manager in System Preferences, CUDA work and updates. Any suggestions? Have tried to install Combi updater for OS x, the problem persists.

    If I remember someone else reported the same problem yesterday and Nvidia suggested to reinstall OS x. If yo boot into Recovery and reinstall without formatting nothing should be lost but backup before just I case.

Maybe you are looking for