Remove the flip of the table entries

Create table as below

CREATE TABLE TEST AS
SELECT 'abc' c1, c2 10001, 10006 c3 FROM DUAL
UNION ALL
SELECT 'abc' c1, c2 10006, 10001 c3 FROM DUAL
UNION ALL
SELECT 'def' c1, c2 10006, 10002 c3 FROM DUAL
UNION ALL
SELECT 'def' c1, c2 10003, 10006 c3 FROM DUAL
UNION ALL
SELECT "xyz" c1, c2 10003, 10006 c3 FROM DUAL
UNION ALL
SELECT "mno" c1, c2 10007, 10008 c3 FROM DUAL
UNION ALL
SELECT "mno" c1, c2, c3 FROM DUAL 10007, 10008
UNION ALL
SELECT 'abc' c1, c2 10001, 10040 c3 FROM DUAL
UNION ALL
SELECT 'abc' c1, c2 10040, 10001 c3 FROM DUAL
UNION ALL
SELECT 'abc' c1, c2 10001, 10007 c3 FROM DUAL;


The current table data is
10001 10006 ABC
10006 10001 ABC
10006 10002 def
10003 10006 def
10003 10006 XYZ
10007 10008 MNO
10008 10007 MNO
10001 10040 ABC
10040 10001 ABC
10001 10007 ABC


Need to remove entries from Rabat for the first column, even. A flip entry can be deleted
That is to say, exit after deletion is:
10001 10006 ABC
ABC 10006 10001 - deleted
10006 10002 def
10003 10006 def
10003 10006 XYZ
10007 10008 MNO
10008 10007 - deleted MNO
ABC 10001 10040 - deleted
10040 10001 ABC
10001 10007 ABC


Can you please put the sql delete for the prescription above.

Thank you
Goyette

Using your sample data, thanks for that, by the way:

SQL> delete from test
  2  where rowid not in (select max(rowid)
  3                      from test
  4                      group by c1, greatest(c2, c3), least(c2,c3));

3 rows deleted.

SQL> select * from test;

C1          C2         C3
--- ---------- ----------
abc      10006      10001
def      10006      10002
def      10003      10006
xyz      10003      10006
mno      10008      10007
abc      10040      10001
abc      10001      10007

John

Tags: Database

Similar Questions

  • Remove the Table created in the forms - IOM Designer

    Dear all,
    Is it possible to remove the Table created in the form designer?

    The Recycle Bin icon is disabled in the console of the design.

    Thank you for your help

    Restore the database.

    This is an instance of dev is for. :)

    Best regards
    / Martin

  • Remove the table for a photo table control framework

    Hello

    I need to create an array of 2D images. Due to the large amount of elements in the array, the width of the image is reduced to a minimum. However there are still a considerable gap between the 2 adjacent elements in the table (see the attached example), which is caused by the picture in the image control.

    I tried to affect the color of transparent photo frame, but even if it is invisible, it is still there. I tried to customize the control too, but I couldn't find a way to remove the framework (for classic and modern styles).

    (BTW, for the control of classical style, there is an option without color box control framework, but no option for 2D image control.) I need model/photos inside the element of control 2D image, so simple color 1 color box is not enough)

    Could someone help to suggest a way to remove the frame and optimize the density of space in the table? Thank you much in advance.

    PJI

    Hello, PJI,.

    You should be able to define the lower field in the area of the image of the control.

    -Right click Control and choose "Advanced Properties"-> "Customize.."

    -To the editor change order to 'Edit Mode'

    -from the menu, click on 'Window'-> 'display the parts.

    -In the part window, select the frame

    -set new values for top, left, height, and width, so that the image is behind the area of the photo

    I hope this helps.

    UliB

  • unwanted in the table entry

    Could someone help, I'm stuck in a problem

    Unwanted in her entries in the table.

    In fact I gave provided that above some condition entries to be filled, the control works but when the condition is false

    the table shows 0 for this value, I have to also use the timestamp,

    The vi is attached below

    Hi soundnt,

    Since a previously asked in the post, the real condition, you can do the writing of file and you want to leave the false values, check and write to the file only for the true condition. For the false condition make an action or if you want intimate put a notification logic to that.

    Thanks and greetings

    Sylvie

  • Emails (1) recent blackBerry Smartphones suddenly deleted from Blackberry - Synch (2) tries to remove the old entries on computer calendar

    Two problems, no idea if they are related or not. I had a Curve 9300 for 18 months - no major problems.

    (1) this evening it all of a sudden all messages deleted more than a few days old f. It is used to transport e-mail maybe 3-4 weeks. No idea why. It happened all of a sudden.

    (2) I've been sync using BB desktop between appliance and MS Outlook 2010 for 18 months. Synchronization suddenly a few months ago tried to delete all the old entries calendar on my computer. I worked hard that by putting the synchronization of calendar configuration "mode 2", 'All the entries in the calendar' with a filter defined on synchronize start dates after 01/01/2013. It worked. But all of a sudden tonight trying to remove almost 100 entries of (recent) Agenda of my computer.

    Any ideas, anyone? Thanks in advance...

    Hello

    Mr_Numbers_135 wrote:

    (1) this evening it all of a sudden all messages deleted more than a few days old f. It is used to transport e-mail maybe 3-4 weeks. No idea why. It happened all of a sudden.

    Here are some tips to use:

    • KB02843 What is the function of low memory manager on the BlackBerry smartphone
    • KB14320 How to maximize space and power battery life on the BlackBerry smartphone
    • KB14213 Call logs, SMS text and email messages are deleted from the BlackBerry smartphone

    Mr_Numbers_135 wrote:

    (2) I've been sync using BB desktop between appliance and MS Outlook 2010 for 18 months. Synchronization suddenly a few months ago tried to delete all the old entries calendar on my computer. I worked hard that by putting the synchronization of calendar configuration "mode 2", 'All the entries in the calendar' with a filter defined on synchronize start dates after 01/01/2013. It worked. But all of a sudden tonight trying to remove almost 100 entries of (recent) Agenda of my computer.

    I suggest this thread:

    It begins with a process to start properly and there is an exchange of views, and there is also a post (15) with links to earlier versions of the Software Desktop, if those who are needed. Note that this is not, by any means, guaranteed to work... but it worked to much to solve the problems they have.

    Good luck!

  • Remove the table if the value not in APEX_APPLICATION. G_f01?

    Hello again!

    I have an apex_application.g_f01 that contains the values in the boxes, now I want apex to remove rows from the table that contains values that are not present in the G_f01 (what are disabled) on submit.

    I can't understand the sql code to do this, could someone give an example?

    This can be a simple thing, but I'm getting confused a lot with sql, maybe because I just php and java.

    EgaSega wrote:

    I have an apex_application.g_f01 that contains the values in the boxes, now I want apex to remove rows from the table that contains values that are not present in the G_f01 (what are disabled) on submit.

    I can't understand the sql code to do this, could someone give an example?

    This can be a simple thing, but I'm getting confused a lot with sql, maybe because I just php and java.

    One possibility would be to create a collection of APEX containing key checked values and use that as the source of the lines to be kept in the SQL delete. Something like:

    begin
    
      apex_collection.create_or_truncate_collection('CHECKED_VALUES');
    
      for i in 1..apex_application.g_f01.count
      loop
        apex_collection.add_member(
            p_collection_name => 'CHECKED_VALUES'
          , p_c001 => apex_application.g_f01(i));
      end loop;
    
      delete from t
      where not exists (select
                           null
                       from
                            apex_collections c
                       where
                           collection_name = 'CHECKED_VALUES'
                       and c.c001 = t.id);
    
    end;
    
  • How to remove the table border

    Dear Kings.

    I was trying to remove the borders of tables (my coding below).

    This encoding does not "result: undefined"? How to remove all borders from the table. Please suggest friends.

    var mTables = app.activeDocument.stories.everyItem().tables.everyItem();  
    with (mTables) {  
      topBorderStrokeWeight = 0;
      bottomBorderStrokeWeight = 0;
      leftBorderStrokeWeight = 0;
      rightBorderStrokeWeight = 0;
      }
    alert("Done")
    

    Thank you in advance to all

    Try this,

    if(app.activeDocument.stories.everyItem().tables.length>0)
    {
    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().bottomEdgeStrokeWeight = 0;
    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().topEdgeStrokeWeight = 0;
    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().leftEdgeStrokeWeight = 0;
    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().rightEdgeStrokeWeight = 0;
    }
    
  • How to remove the Tables of HFM Application in SQL

    Hi gurus

    1. how to remove the HFM Application Tables in SQL?
    Its manual removal but each application having 120-150 tables? How to do this in one fell swoop?

    I deleted some applications using the workspace / shared services, but still its display under HFM under the Tables of SQL Server.

    Please help me

    concerning
    Smilee

    Hi Smilee,

    1. If the application opens in the web management interface, go to Taskflows management module and make sure that no taskflows exist yet for this application. Remove any existing taskflows.

    2. If demand exists in Shared Services, right-click on the demand for Shared Services and try to remove the application from here

    3. stop Hyperion Shared Services and all the Windows of financial management processes and backups of the relational database of the two patterns.

    4. check the relational database of Hyperion Shared Services repository, in the "ces_apps" table and make sure that there are no lines containing the appname "EXAMPLE." If the line still exists you should enlist the help of Oracle Global Support software to clean Hyperion Shared Services before proceeding.

    5. it is possible to remove all content removed from the relational database of financial management application. Must be very careful when handling manually tables database that permanent damage can be done at the application and other applications if the wrong content is removed.

    (a) first remove all tables, indexes, sequences, and the package objects that begin with the name of the application
    (b) remove all tables starting HSV_appname_xxxxxx
    (c) remove all rows in tables referring to demand HSX_CLUSTER_xxxxx.
    (d) delete all the HSV_ACTIVITY_KILL_USERS, HSV_ACTIVITY_NO_ACCESS, HSV_ACTIVITY_SESSIONS and HSV_ACTIVITY_USERS and HSV_USERS_ON_SYSTEM lines that refer to the name of the application.
    (d) remove the line containing the name of the application from the HSX_DATASOURCES table.

    6. the next time that all Hyperion services are restarted, the application must be removed safely from Windows client.

    You can contact your DBA to write a query on how to remove it.

    Hope this helps,

    Thank you
    Charles Babu J

  • Remove the Table of contents of a Quiz

    Hello

    Is it possible to remove access to the training when the user passes a test? Looks like there must be a way...

    Dan

    Action Rod pointing to that is to assign the value 1 to the system variables cpLockTOC. Its default value is 0. It is not even necessary to have a tip action, at least if you're on a later version of Captivate because the system variable is not in the drop-down list of the accordion to Actions in the slide properties. A simple action on enter to the first question slide will do. Don't forget to switch it to 0 when you enter backstage after the quiz to allow access again. And the linear?

    It is also possible to hide the table of contents with another variable of system but only if you use the table of contents in overlay mode.

    http://blog.lilybiri.com/system-variables-in-Captivate-6

    Lilybiri

  • Why can't remove the table?

    I find a table under soctt Solaris 11g, named BIN$ dnz9wkbnQZaxdctGcob3RA == $ 0, as follows:
    SQL > select * from tab;

    TNOM TABTYPE CLUSTERID

    BIN$ dnz9wkbnQZaxdctGcob3RA == $0 TABLE
    BONUS BOARD
    DEPT TABLE
    EMP TABLE
    SALGRADE TABLE

    I do not know when the table created, if I want to delete the table, can I use following command:
    SQL > drop table BIN$ dnz9wkbnQZaxdctGcob3RA == $0;
    drop table BIN$ dnz9wkbnQZaxdctGcob3RA == $0
    *
    Line 1 error:
    ORA-00933: SQL not correctly completed command.

    Why I can't remove this table? How to do?
    Thank you

    Handle: EdwardKing
    Status level: Beginner
    Join date: 27 May 2002
    Messages total: 61
    Total Questions: 24 (24 remaining)
    so many questions without answers ANY .
    :-(

    http://forums.Oracle.com/forums/Ann.jspa?annID=718

    Why I can't remove this table? How to do?

    When a table is dropped, it goes in the TRASH; It may therefore be FLASHBACK.

    What you're trying to DELETE a table already in the TRASH; is NOT authorized.

    When all else fails, read the Fine

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28310/tables011.htm#ADMIN11682

    Published by: sb92075 on February 11, 2011 17:47

  • remove the table filter criteria

    I used af:table to display data and used the data in the column filter to filter. After you have specified any search criteria, that he must remove it manually, and then press ENTER. I want to remove the search by program criteria and display the data in the table without any search criteria.
    How to remove table filter criteria in backing bean and update the table?
    Thanks in advance.

    Use google and search for "programmatically manipulate filter a table QBE fields" (from steve muench) ;)

  • Removes the table causing a lot of disk reads

    Until recently that we hadn't made many deletions on one of our large tables in the comic book. After a recent project has been implemented, system performance has gone downhill a bit. Research in one of the top offenders through v$ sql, we find this:

    REMOVE IRQ INSPECTION_REQUEST WHERE WORK_ORDER_SEQ =: B1 AND SEQUENCE_ID IN (SELECT SEQUENCE_ID FROM (SELECT SEQUENCE_ID, CHAR_VALUE FROM INSPECTION_REQUEST_CHAR WHERE WORK_ORDER_SEQ =: B1) X WHERE THE CHAR_VALUE IS NULL).

    Here are some stats I see in table v$ sql:

    Performances: 4
    Analyze the calls: 4
    Disk reads: 565457
    Gets the buffer: 634626
    Time CPU: 69280000
    Elapsed time: 290015297

    If I read this correctly 100 000 disk reads are performed on average whenever this statement is executed. The situation that I am is that the table we are trying to remove from has not been analyzed in almost 2 years and many of the indexes on the table have not been analysed in more than a year. Is my problem here something to do with the fact that this analysis has not been done or is there something else, I'm missing?

    We checked the SQL to use the correct index and it is set to perform at its best. We have also tried to run this in our dev environment, and we have the same problem with the slow delete. We even watched the rowid for a row we try to delete and tried to delete by the rowid and the DB is still thousands of readings of the disk to perform this deletion. Our dev table and all the clues have been analyzed recently (last month or almost).

    So maybe it takes away the possibility that the absence of analysis of the tables and indices of production contributing to the issue. At this point, I am at a loss. Here is the statistical information for this table in the production.

    Parameter, value
    Size in MB, 20464.00
    Numbers Extents, 1279
    Size in bytes, 21458059264

    TABLE_NAME, INSPECTION_REQUEST
    NOM_TABLESPACE, DATA_LARGE_2
    CLUSTER_NAME,
    IOT_NAME,
    PCT_FREE, 10
    PCT_USED,
    INI_TRANS, 1
    MAX_TRANS, 255
    INITIAL_EXTENT, 1048576000
    NEXT_EXTENT, 16777216
    MIN_EXTENTS, 1
    MAX_EXTENTS, 2147483645
    PCT_INCREASE, 0
    FREELISTS,
    FREELIST_GROUPS,
    LOGGING, YES
    BACKED_UP, N
    NUM_ROWS, 18095357
    BLOCKS, 1196456
    EMPTY_BLOCKS, 0
    AVG_SPACE, 0
    CHAIN_CNT, 0
    AVG_ROW_LEN, 485
    AVG_SPACE_FREELIST_BLOCKS, 0
    NUM_FREELIST_BLOCKS, 0
    DEGREE, 1
    CASE 1
    MEMORY CACHE, N
    TABLE_LOCK, ENABLED
    SAMPLE_SIZE, 18095357
    LAST_ANALYZED, 2007-04-01 06:41:24
    PARTITIONED, NO.
    IOT_TYPE,
    TEMPORARY, N
    SECONDARY, N
    NESTED, DON'T
    USER_TABLES, DEFAULT
    ROW_MOVEMENT, DISABLED
    GLOBAL_STATS, YES
    USER_STATS, NO.
    DURATION,
    SKIP_CORRUPT, DISABLED
    SURVEILLANCE, NO.
    CLUSTER_OWNER,
    ADDICTIONS, DISABILITIES
    COMPRESSION DISABLED

    user9539428 wrote:

    delete from inspection_request where sequence_id = 9911147198;

    SEQUENCE_ID is the primary key on the table INSPECTION_REQUEST. This only delete statement performs 7 000 disk reads. Is this normal? We have this problem even if it is disable triggers that would fire following this statement.

    To everyone who looks at the thread, the version of db, on that we are is 9.2.0.8.

    If you have verified that all triggers are actually disabled on the table, there are a few potential candidates that could cause this large amount of activity during the removal of a single line:

    * Enabled foreign keys referencing this table
    * Maintenance of Index, your index finger on the table could be degenerate and could benefit from an operation of "merge".
    * Bugs in SAMS if you use a tablespace locally managed with automatic management of the space for indexes

    You can follow this thread that might have similar problems:

    Ellapsed time too tkprof output

    Try to run the simple removal using SQL trace enabled (Event 10046) scopes as described in the above thread. After the release of "tkprof" of the trace file generated here, as described in the following thread: [when your query takes too long | http://forums.oracle.com/forums/thread.jspa?threadID=501834]

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • remove the table select row

    Hello

    I'm trying to find a way to delete a selected line in a text file. You can find a classic text file that join this message.

    I first try to insert the text file in the command using node property value drop-down list box, but I see that the first line. I did the same thing with a command table and it works! Now, I need to select a row and delete it. I try to use the node property of the active cell, but I always get (0,0). Why? Someone knows how to do?

    Better idea to do the same task is also welcome.

    LabVIEW 8.5 windows XP

    Thank you

    Francis

    Hi Francis,.

    You should try using the attribute SelStart to the table rather than the property of the Active cell.  Active cell is just used to set the active cell.  Here is a quick change that I made to your code that deletes the selected table row when you press the button Delete and resulting out of the table.  I hope that you should get pointed in the right direction.

  • I uninstalled a program that says he would remove the registry entries but the system subsequently restore says I have does not changes to the computer.

    What can I say?  System Restore is not useful for me.  Too often, there is no restore my computer to an earlier state.

    System Restore rarely admits that I had changed the computer - even when I uninstalled programs in the root directory.  What takes to "make changes to my computer?

    Install programs often has no changes - he said.
    Often the programs uninstaller is not make changes either.

    I did both today and could not undo the changes.  Tired of this.
    Save the register will take the place of the system restore?

    At least I can save the computer with Acronis True Image or Norton Ghost.

    Thank you
    Richard

    What is your system brand and model?

    What is your Version of XP and the Service Pack?

    Describe your current antivirus and software anti malware situation: McAfee, Norton, Spybot, AVG, Avira!, Defender, ZoneAlarm, PC Tools, MSE, Comodo, etc..

    What problem are you having this thing you that System Restore will remedy - or you're just in practice?  (It should still work).

    Some anti-virus / Anti-Malware tools 'protect' your system so that they will not allow a restore of the system work properly.

    For example, if you use Norton/Symantec products, you will see a message like this:

    Restoration incomplete. Your computer cannot be restored...

    It is also a popular Symantec problem (well, I'll be polite and call an "undocumented feature"...), they wrote an article about it:

    http://Service1.Symantec.com/support/sharedtech.nsf/pfdocs/2005113009323013

    Depending on what you use for malware protection, you may need to disable the product temporarily, to the restoration of the system, then
    Turn on the product.

    Sometimes you need start your system in Mode safe and so that your protection programs are not running, and then do the system restore.

    Tips from Microsoft in some of their articles that if the system restore does not restore your computer, start in Safe Mode, and then run the system restore.  Well, it seems to work for some configurations.

    System Restore is sometimes so afflicted or Restore Points are suspicious, the best solution is to reinstall your system restore.  This will remove the old Restore Points, but sometimes it's the only way to fix a broken system restore.  You don't have to reinstall XP, only the part of system restore.

    Give these ideas some consideration if they apply to you.

    Sometimes malicious will afflict your system restore to prevent you to find and remove malware.  It would much rather you trick into thinking that you need to repair or reinstall your XP when it is not necessary.

    No matter what you use, I do so and then only begin to solve any problems:

    Download, install, update and do a full scan with these free malware detection programs can solve any problems:

    Malwarebytes (MMFA): http://malwarebytes.org/
    SUPERAntiSpyware: (SAS): http://www.superantispyware.com/

    It can be uninstalled later if you wish.

    The scans by operating clean, reboot, test and we can fix any other issues.

  • want to remove the table in 10g

    Hi all;

    I was 1 million inserting dummy records in the table.

    Unfortunately, closed session without commit or rollback.

    > > now, I want to delete the table

    SQL > drop table petra.ycx;

    drop table petra.ycx

    *

    ERROR on line 1:

    ORA-00054: resource busy and acquire with NOWAIT specified

    SQL > select count (*) in the petra.ycx;

    COUNT (*)

    ----------

    2

    SQL > select a.sid, a.serial # session $ v a, v$ locked_object b, c dba_objects

    2 where b.object_id = c.object_id

    3 and a.sid = b.session_id and OBJECT_NAME = 'YCX. "

    SID, SERIAL #.

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

    11 159

    SQL > alter system kill session 11 159;

    alter system kill session 11 159

    *

    ERROR on line 1:

    ORA-00026: missing or not valid session ID

    The command is

    alter system kill session '159,11';
    

    Justin

Maybe you are looking for

  • Satellite A110-275: movies on DVD - R do not work

    Hi everyone I had a problem. A couple of weeks, I installed Vista on my laptop, to find every time that I burned a DVD movie, it would not properly play in my DVD player. So I thought it was a problem of Vista compatibility. So I reinstalled Windows

  • Satellite 2450-401-hardware upgrade

    Hello! I have a satellite 2450-401 with 512 MB of RAM; 40 GB and Nvidia GeForce4 420 go. I would like to know if is possible to updgrade my pc to a 1 GB of RAM, more space and a better map chart!Is - this talkative? Thanks in advance

  • Airport Extreme can amplify two distinct networks?

    I have Cox hispeed internet and a simple modem which is divided into two separate networks; one of my computers and the other for support (Apple TV, etc.). My unique adjustable Airport Extreme upward to stimulate each of these networks or I am only a

  • ERazer X 315 R9 255 2 video memory.

    Recently, I find that my office is very slow when I play games. And when I check the display settings I find that my GPU has 1024 video memory MB(1G). The GPU on X 315 is 255 R9, which should have the video memory 2 g. can you tell me why and how I c

  • Windows Home Server 2008 now believes that it's three things.

    We are a partner of Microsoft Certified skills. We run a Windows Home Server 2008, with each patch as possible and kept up to date on everything we can. We use it for customers to play or download demos of vidoes and product on our site of Office 365