How to fix SQL results in double

Hi all

I am Michel.

I want to correct Oracle 11 g SQL statement
on the view, the table is locked.

The SQL class that can be created as follows.

----------------------------------------------------------------------
SELECT
"view the table is locked.
V.INSTANCE_NAME,
EU. NOM_SEGMENT
OF SYS. V_$ SESSION SE, SYS. V_$ LOCK M, SYS. V_$ INSTANCE V, SYS. USER_EXTENTS EU
WHERE EU. EXTENT_ID = 1
AND ((SE. SID = M.SID
AND M.REQUEST! = 0)
OR (ES. SID = M.SID
AND M.REQUEST = 0 AND LMODE! = 4
AND (ID1, ID2) IN
(SELECT S.ID1, S.ID2
V $ LOCK S
WHERE TO ASK! = 0
AND S.ID1 = M.ID1
AND S.ID2 = M.ID2)))
----------------------------------------------------------------------


Deriving from the execution of SELECT, appear as shown below.

----------------------------------------------------------------------
'' VIEWTHETABLEISLOCKED' ', ' INSTANCE_NAME', 'NOM_SEGMENT '.
"view the table is locked ', 'hand',' employees_BK '.
"view the table is locked ', 'hand', 'employees '.
"view the table is locked ', 'hand',' employees_BK '.
"view the table is locked ', 'hand', 'employees '.
----------------------------------------------------------------------


Looking at the results of the foregoing and duplicate results are displayed.

The feeling that without the high cost of SEPARATE,
As described below, the SELECTION can be made that redundant.
I want to change the SQL statement.

----------------------------------------------------------------------
'' VIEWTHETABLEISLOCKED' ', ' INSTANCE_NAME', 'NOM_SEGMENT '.
"view the table is locked ', 'hand',' employees_BK '.
"view the table is locked ', 'hand', 'employees '.
----------------------------------------------------------------------

How can I change the SQL for how I think that I enjoyed.

Thank you and best regards.

Michel Hi Please try this

Select *from
(
SELECT
'view the table is locked',V.INSTANCE_NAME,UE.SEGMENT_NAME,row_number() over(partition by V.INSTANCE_NAME,UE.SEGMENT_NAME order by null) rn
FROM SYS.V_$SESSION SE, SYS.V_$LOCK M, SYS.V_$INSTANCE V,SYS.USER_EXTENTS UE
WHERE UE.EXTENT_ID = 1
AND ((SE.SID = M.SID
AND M.REQUEST != 0)
OR (SE.SID = M.SID
AND M.REQUEST = 0 AND LMODE != 4
AND (ID1, ID2) IN
(SELECT S.ID1, S.ID2
FROM V$LOCK S
WHERE REQUEST != 0
AND S.ID1 = M.ID1
AND S.ID2 = M.ID2)))
) where rn=1

Tags: Database

Similar Questions

  • Question: How can format SQL result in specific order?

    Hello

    My table looks like this:

    COLONNE_1
    COLUMN_2
    oneCAT
    onedog
    twopig

    I would get the reqult as:

    COLONNE_1 COLUMN_2

    a cat, dog

    two pig

    Can someone tell me how interrogate who?

    Thank you!

    Hello

    Try this

    Select colonne_1, listagg (column_2, ',') within the Group (order of column_2) column_2

    of looks

    Colonne_1 group

  • Someone knows how to fix a corrupted file mib.cab? 2350 error code? The result of the installation failed for Mindstorms NXT 2.0 on computer vista laptop, service pack 2.

    Tried to install the Lego NXT 2.0 software (programming robotics), a message "file 'mib.cab' required for this installation is corrupt and cannot be used.  A message gives the error code 2350.  Someone knows how to fix a corrupted file mib.cab?

    Try in the Forum of programs:

    http://social.answers.Microsoft.com/forums/en-us/vistaprograms/threads

    See you soon.

    Mick Murphy - Microsoft partner

  • How to reach below result in Oracle SQL

    Hi all

    How to get the result below:


    database table:
    COLA, COLB
    112 1ST JANUARY 2012
    113 FEBRUARY 2, 2012
    114 MARCH 2, 2013
    115 APRIL 1, 2013



    Result table:


    COLA, COLB TEACHERS
    112. ON 1 JANUARY 2012 FEBRUARY 1, 2012
    113 2 FEBRUARY 2012 1 MARCH 2012
    114 2 MARCH 2013 MARCH 31, 2013
    115 1ST APRIL 2013 APRIL 2, 2013

    Thank you!

    Spleen the last row... it's probably more like...

    select cola, colb, nvl(lead(colb) over (order by cola)-1,colb+1) as colc
    from basetable
    order by cola
    
  • How to fix a missing file

    Original title: missing file

    How to fix file missing 0 x 80070002

    Ralph

    http://blogs.technet.com/b/filecab/archive/2008/03/12/common-causes-and-solutions-to-backup-system-restore-and-complete-PC-backup-problems-updated.aspx

    If the suggestion in the link fails to solve the problem after a copy of the error report in the event viewer.

    Event Viewer reports

    1. normally, when an error occurs on your computer looking in Event Viewer should be your starting point to find a solution. More related system errors are recorded and get an exact copy of the relevant report is important. Unfortunately, is not easy to understand reports and most of the users computer need help with their interpretation. I have to say later interpretation.

    2 Event Viewer includes three main newspapers of Windows. Here's the Application, security, and system. For purposes of troubleshooting system is by far the most important.

    3. to access the system log, select Start, Control Panel, administrative tools, Event Viewer, in the list on the left of the window select Windows and the system logs. Place the cursor on the system, right click and select filter current log. Check the front of the error and click OK and see you only reports errors. Click the Date and time column header to sort. You may need to click a second time to see the last report above.

    4. a tip for posting copies of error reports! Run Event Viewer and double-click the error you want to copy. Select the Details tab and check the box in front of the XML view. Click the copy button to place a copy in the Clipboard and close Event Viewer. Now start your message and paste it into the body of the message. Make sure that it is the first dough right out of the event viewer.

    5. He cautioned against three types of reports, information, and reports errors. In most situations, it is the error reports that offer the best information but sometimes WARNING reports provide useful clues.

    6. all reports have stamps date and hour and when troubleshooting, it is important to focus on the latest reports. Reports of studies from the point when the computer is started, and then check if a similar report appeared in the previous session. If errors do not repeat investigation as to why they happen is wasted effort.

    7. in the individual reports the most important information is the event ID and Source such as these help when looking for help on the internet. The description is just as important and copy the exact text to use as search criteria greatly helps achieve better results when using Google. Not paraphrase descriptions when other people asking for help.

  • my safari has been hacked or locked up how to fix

    my safari has been hacked or locked up how to fix

    Double-click on the button of your home, find the Safari app, press them and direct them to the top to remove recently used applications.

    Then go to settings > Safari > clear history and data.

    Restart Safari.

  • Safari has locked up how to fix

    my account locked safari need to know how to fix it, they say, locked due security reasons please help

    Try to force quit safari, and then restart your iPad

    to force quit safari, double-tap "the home" button and flick the preview for safari and off the screen. unique then press the home button to exit the mode.

    To force your iPad to restart, hold down the sleep and home for about 20 seconds. When you see the silver Apple, let go and let it restart.

    I presume that you are experiencing a common bug with iOS9.3 and you tried to click on a link in Safari that caused his gel. If so, what the above then go to the app store and find another browser to use in the meantime, until this bug is crushed by Apple.

    If you simply browsing as usual and you had a malicious ad take in charge your iPad, do the above, then go to settings, Safari and throw your history. This will prevent this announcement reloading and locking of your safari to the top.

  • How to fix the bug of 1970 on iPad mini 2

    How to fix the bug of 1970 on iPad mini 2

    It is not a bug. It is the result of a deliberate action by the user. However, some reported that the DFU restore, if it does not, then you must make an appointment at the Genius Bar at the Apple Store closest to him have supported. Apple is working on an update that will prevent users from doing it again. If you changed the date to May 1970 or earlier and he can't restart your iPhone, iPad or iPod touch - Apple Support

  • I have a HP Deskjet D4160 printer. The reset button will Flash. Diagnosis HP said there was a "breakdown of pen", but he didn't give any directions on how to fix it.

    Original title: breakdown of pen deskjest d4160

    I have a HP Deskjet D4160 printer. The reset button will Flash.  When I ran the HP diagnostic he said there was a 'pen failure' that had to be fixed, but he didn't give any directions on how to fix it.

    Hi Fred Cornell,.

    ·         You have any problems with the performance of the printer?

    ·         What operating system is installed on your computer?

    ·         The printer works well before?

    You can check the link mentioned on official website of HP that describes the problem for the specific printer model you are using.

    Flashing lights in the HP Deskjet D4160 printer

    http://h10025.www1.HP.com/ewfrf/wc/document?DocName=c00635074&cc=us&DLC=en&LC=en&product=501857#n129

    Alternatively, you can contact HP support for help on the issue.

    HP support

    http://WWW8.HP.com/us/en/support-drivers.html

    Let us know the results.

  • does anyone know how to fix the window with error code 80080005 updates

    can someone tell me where to go to get what I need to fix it is error 80080005

    Windows operating system?

    Windows XP perhaps-

    You may receive an error message that contains the "0x8DDD0018" code or the code '0 x 80246008' when you try to download the updates on the Microsoft Windows Update Web site or the Microsoft Update Web site
    http://support.Microsoft.com/kb/910337
    Windows could not start the service on the local computer's Background Intelligent Transfer. For more information, see the system event log. If it is a non-Microsoft service, contact the service vendor and refer to service particular-2147467243 error code. (0 x 80080005)
    error message is similar to the error message "error 5: access is denied." To resolve this problem, follow the steps described in the section "error 5: access is denied."

    This error indicates that access for FOREST permissions have been modified. To repair these access permissions, use one of the following methods, depending on the operating system.

    Windows XP

    1. Click Start, click run, type cmd, and then clickOK.
    2. Type the following command and press ENTER:
      SC tisb strands D: (A; CCLCSWRPWPDTLOCRRC; SELLERS) (A; CCDCLCSWRPWPDTLOCRSDRCWDWO; (BA) (A; CCLCSWLOCRRC; AU) (A; CCLCSWRPWPDTLOCRRC; CENTRAL UNIT)
    3. Click Start, click run, type services.msc and clickOK.
    4. Double-click on Background Intelligent Transfer Service.
    5. On the general tab, click Start.

    Or Maybe Vista:

    0 x 80080005 implies that Microsoft Installer is not configured correctly or it may have malfunctioned.

    Run the Startup Repair tool by using the Windows Vista installation disc

    How to repair the operating system and how to restore the configuration of the operating system to an earlier point in time in Windows Vista
    http://support.Microsoft.com/kb/936212

    How to fix Windows Vista using Startup Repair automatically
    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Startup Repair frequently asked Questions
    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

    Maybe Windows 7 .

    TaurArian [MVP] 2005-2011. The information has been provided * being * with no guarantee or warranty.

  • Can't see kill County and buildings razed in age of empires 2 conquerors, how to fix?

    I reinstalled the game, fixed it at first, but when I installed 1.0 c and installed Woobly (which is where I play online for age of empires) it shows kill account less than 10 years old when I killed more than 200 and razed buildings it shows 0, it's the lie.

    How to fix?

    Hi Nbaking2,
     
    We recommend that you download and install the age of empires Game Update and check the result. To do this, refer to the following Web site: http://www.microsoft.com/games/PC/age2expansion.aspx#downloads
     
    For further assistance on the age of empires, post your request here: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.ageofempires
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.
  • Win XP SP3, no taskbar (tray) does AutoScan, no system restore, how to fix?

    Everything was in good working order when I shut down my pc for the night.  The next morning, I tried to play a mp3 music file, but no sound. Then, I noticed that (the speaker icon) volume control icon was missing from the taskbar. I have rebooted, thinking that would restore the icon, but the result was that the taskbar all disappeared, leaving me with no start button, no way to access programs or tools.

    Help and Support is not available, that is why it is the restoration of the system.  Via the Task Manager (file > new task > run) I can run programs and applications, but even if they seem to run, they do not work.
    Has spent two full days, trying to solve this problem and I now want to reinstall Windows, but another question is: I have only the original CD of XP Home.  Installation of XP says my installation is newer than the one on the CD (my system installed a Service Pack 3 and all Windows updates), so it can not be repaired and resettlement (since the old XP CD) will cause all my existing files and programs are permanently lost. Is this true? We used to be able to reinstall over an existing installation of Windows, and it would be, indeed, to 'renew' the Windows installation, but leave our files, images, programs, etc. intact. As a graphic designer, I have a large number of files, pictures, programs and applications that cannot be replaced, and I can't risk losing them.
    I have a sufficient margin on a D: / drive for everything on C: /, but wants that the wizard settings, and files on the XP CD to copy the content of two disks, so after a few hours of the collection of files, the wizard reports not enough room on D: / the transfer. I tried to burn to CD/DVD, but the wizard does not recognize my optical drives, only a floppy drive, and it would take hundreds of 1.44 MB floppies. I saw no floppy drive in stores for years and that a lot is not an option to purchase.
    I have a laptop available (which I use to access this web site), but it's a Dell Latitude older with far enough disk space to contain a small amount of data that I need to move away from the broken Office.
    The office with the problem began his life as a TigerDirect Systemax, with a 2.50 Ghz Intel processor, 1 GB of RAM, two HARD drives, each capacity of 60 GB, about 1/3 used on C: /, I need to save if possible, and about 1/4 used on D: / I could copy my files to D: / If the wizard would not copy the contents of D : / and C: /.
    I can't find any way to select which copy other than the ability to choose or not choose certain types of files. No way to tell the Assistant is not to copy the D: / drive.
    I would be very happy if:
    1. There is a way I can restore my taskbar and start button, (thus allowing me to access the tools to solve other problems that caused the problem);
    Or
    2. If I can simply reinstall XP on my existing installation without losing existing data (my programs, files, etc.)
    Yes, I realize that it is time for a new operating system and probably a new machine, but I cannot and I do with what I have. Any help and suggestions would be welcome.

    What's an error 5 - a permissions problem (you do not have permission).

    Did you use a registry cleaner and if what you (and why you thought it would help)?

    I love the good registry cleaners and have never had a problem with them, but there are of course a lot of horror stories and Council do not to use.  But I think as long as you have a plan for what to do and how to recover if your system fails or doesn't start at all after having used to have them home.

    I have probably used/tired all and never had a problem.  Can not say something very good has happened except that I could see the report of all the unwanted that he removed, for the most part, uninstall of products that do not do a good job of cleaning after themselves (even Microsoft products) and felt better then think things were more to the less net because I could see all unwanted leftovers that was deleted.

    Reinstalling XP is never an option for me.  my XP has been installed and works very well after almost 10 years.  There are too many people who need to be able to fix their system and they have no installation CD for so never had a she, lost the dog has eaten, etc, or their system does not have a CD/DVD drive even if they could come with an installation CD.

    Learn how to fix things in the most difficult conditions that matches that you want to find in the real world on the planet called Earth and not a fantastic planet or a world of dream.

  • How to fix a webcam showing the photo upside down trying to Skype?

    Original title: program compatibility Application Applications Apps game games Legacy Crash accidents Application Hang hangs

    How to fix a webcam showing the photo upside down trying to Skype?

    Hi obafemiosinnowo,

    In version 5.5.0.2340, clicking once on your image in the toggle image size of the PIP of the size of the thumbnails to slightly larger and back. This behavior is identical to the Windows version 5.8.0.156.

    However, unlike the version of Windows in Mac version once your PIP in the largest size there is no method, by dragging the corners, etc., to resize the additional PIP. The result is that the PIP is too small, even in the larger of the two sizes available

    Community.Skype.com

    https://support. Skype.com/.../how-do-i-change- the -picture- in-a-group

    https://JIRA. Skype.com/browse/SCM-958

    https://support. Skype.com/.../How-do-I-update

  • How to fix the memroy vartuial on my computer? said memroy is low

    whenever I get on the internet there's a little window that opens at least fifty times tellin me my memroy vartiual is low and I did everything I can think of to solve even paid a guy who fixes computers for earning a living and she always does I need to know how to fix thos problem because it me the Internet when it's kicked several times

    Hi Jamesbeardqb,

    Thanks for posting in the Microsoft community! You have reached the right forum for your question.

    I suggest you try the following steps:

    a. Click Start, right click my computer and then click Properties.
    b. in the System Properties dialog box, click the Advanced tab.
    (c) in the results pane, click settings.
    d. in the performance Options dialog box, click the Advanced tab.
    e. in the virtual memory section, click on change.
    f. change the initial size value and the value of maximum size to a higher value, click on set and then click OK.
    g. click OK to close the performance Options dialog box and then click OK to close the System Properties dialog box.

    See also: RAM, virtual memory, paging file, and memory in Windows Management
    http://support.Microsoft.com/kb/2160852

    Hope this information is helpful and let us know if you need more assistance. We will be happy to help.

  • I understood the problem, but don't know how to fix it. It is said to run dxdiag because of the direct 3D, so I run dxdiag and it finishes loading, I test direct 3D and it works very well...

    I understood the problem, but don't know how to fix it. It is said to run dxdiag because direct 3D, so i run dxdiag and it finishes loading, I test direct 3D and it works fine, so I re-run halo, but then it still doesn't work. so I went online for patches, but when I downloaded a patch for windows 7, but I have windows xp. so I go back to the internet and search for patches for windows xp, but there is no result. so I thought change to windowed mode halo would work but it dident work when I ran halo 3rd becose my color depth is low, I have 24-bit color quality, but I don't know how to change, so I look for a way to change this for months and no results.so to microsoft answers site please help me because I have nothing else in my mind to the difficulty of halo

    I have:
    (1.halo of the trial
    (custom edition 2.halo (full)
    Halo is ever going to work on my computer
    because he never did
    I play with my cousins that I visit about 3 times a year

    Hello

    I suggest you go through the link.

    Minimum system requirements for Halo: Combat Evolved
    http://support.Microsoft.com/kb/829479

    Please check if the computer meets the minimum system requirements to play HALO game
     
    You can also refer to:

Maybe you are looking for

  • E4200: Possible to share USB SMB to WAN?

    I realize that the E4200 User Guide says for remote access you should / must use FTP, but I would that my actions of Windows (SMB/CIFS) are available for the outside world. I tried a few combinations different configuration of redirection of port and

  • WHERE WILL the DIVS FOR BASIC of EXPLANATION?

    I want just bluetooth my photos etc from my laptop to my laptop, so what/how I know if its possible, such that it is impossible to get one on the other, as you do to add to the list of devices mobile! I seem to get to control panel configuration/hard

  • Attached to BBid Smartphones blackBerry e-mail is no longer exist

    I know that my BBid, password and secret question also answered. but still cannot use BBapp as it does not accept my login information. In fact, my mail server carrying my associate email BBid ended last month and I don't imagine it will cause a prob

  • G72-a20EM screen has stopped working after updating the BIOS F.48.

    How is it possible that BIOS update recommended could turn off the LCD screen. Currently I see almost anything on the screen, but vga port works. But increasingly,. Intel graphics card is not recognized. G72-a20EM screen has stopped working after upd

  • I can not change the billing address in 'manage account '.

    Dear Sir / Madam,.Our company is moved, and changed the billing address. I can't change it in my account, I always get an error.My email address has changed and I've changed it to 'Manage account' but we are still receiving bills to the wrong e-mail