simple query... but could not
CREATE TABLE person_del(
DNO VARCHAR2 (5).
place VARCHAR2 (10),
EU VARCHAR2 (10)
)
commit;
insert into person_del values('1','home','Y')
insert into person_del values('1','office','N')
insert into person_del values('1','other','Y')
insert into person_del values('2','office','Y')
insert into person_del values ('3', 'home', 'n')
insert into person_del values ('3 ', 'Office', 'Y')
insert into person_del values ('4 ', 'other', 'n')
insert into person_del values ('5', 'home', 'Y')
insert into person_del values ('6', 'home', 'n')
insert into person_del values ('6', 'Office', 'n')
insert into person_del values ('7', 'home', 'Y')
insert into person_del values ('7 ', 'Office', 'Y')
commit;
Select * from person_del
Select the dno, place, got,
-case when am = 'Y', and then 'Y '.
Another null
end as "won".
of person_del
where to put in ("home", "office")
I ran the query above, but the result is not what I wanted
The condition is as follows:
List Y in a new column "earned" for these dno who reached the place - home or office
If a = Y for the home place and GOT = N for the Office of the place, then only view this column where OBTAINED = Y
If a = N to the home place and GOT = Y for the Office of the place, and then view only this column where OBTAINED = Y
If both are N then list a any column
If the two are then all a fo the column in the list
The place else is not taken into account
The output should be dno and won the column
I know it's simple... but I couldn't do it and I need it in a few minutes
Can someone help me on this using the CASE statement or something that is not difficult to understand the ASAP?
Basically, the output of it should be as follows:
DNO has won
1. IS
3 8
2 8
8 4
6 N
7. THERE
What:
SQL> select dno
2 , got won
3 from ( select dno
4 , got
5 , row_number() over (partition by dno, got order by dno, got desc) cnt
6 from person_del t
7 where t.place in ('home', 'office')
8 )
9 where ( case
10 when got = 'Y' and cnt = 1 then 1
11 when got = 'N' and cnt = 2 then 1
12 end
13 ) = 1;
DNO WON
----- ----------
1 Y
2 Y
3 Y
5 Y
6 N
7 Y
6 rows selected.
Tags: Database
Similar Questions
-
I tried to remove them, but could not. Help me remove these files that are not open.
Hello Emma, try to restart your computer and delete files immediately after. Alternatively, you can use a tool like unlocker to remove the lock and delete files...
-
HP 4620: HP 4620 scans very well, but could not save the analysis in a file
The scanner scans very well, but could not save the analysis in a file. Whenever I try to save, it crashes.
Hey @motikama,
Welcome to the Forums of HP Support!
I see that you encounter some problems with the scanning of your Officejet 4620 e-all-in-one for your Windows 7 PC. I can help you with that.
To start, make sure that the printer is plugged directly into a wall outlet, not a surge protector. Once done:
- Uninstall all software associated with the printer to your computer.
- Restart your PC.
- Download and install the latest drivers by clicking on this link.
Please let me know the results after following the above. If you can scan, click on accept solution. If you appreciate my help, please click on the thumbs up icon. The two icons are below this post.
-
How do I use the sony vaio VPCEC3S0E built in motion eye camera I have attached looking for the correct drivers but could not locate them
Hello
Troubleshoot camera connection
http://Windows.Microsoft.com/en-us/Windows7/Troubleshoot-camera-connection-problemsYou probably need to recharge the device drivers and camera control software (usually included
with the drivers and installed at the same time).Login as an administrator.
Double-click Control Panel / Device Manager - Imaging - writing down of the brand and model of camera.
on this subject and on the tab of the driver is version. Now, click on update drivers (who are unable to do anything as MS
is far behind the pilots of certification). RIGHT click on the camera - UNINSTALL - REBOOT - it
will update the driver stack.Now, go to the system manufacturer's website and download the latest driver for the camera and the other related camera
software (if not more recent get the same).Download - SAVE - go to them and RIGHT CLICK - RUN AS ADMIN - reboot after each driver.
Manually look at the sites of the manufacturer for drivers.
http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htmInstallation and update of drivers to 7 (update drivers manually using the methods above is preferred
to make sure that the latest drivers from the manufacturer of system and device manufacturers are located)
http://www.SevenForums.com/tutorials/43216-installing-updating-drivers-7-a.htmlThen let windows updates on however prevent loading of drivers who are often older than the
those that you have installed. If updates suggests a pilot and then HIDE it and watch manually to see if their
really is a more recent version (at the time system manufacturer and the sites of the manufacturer of the device).Stop Windows 7 to automatically install device drivers
http://helpdeskgeek.com/Windows-7/stop-Windows-7-from-automatically-installing-device-drivers/How to disable automatic driver Installation in Windows 7 / Vista
http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/Turn off Windows Update Device Driver search prompt in Windows 7 / Vista (for professionals,
Ultimate and Enterprise)
http://www.AddictiveTips.com/Windows-tips/disable-Windows-Update-device-driver-search-prompt/----------------------------------------------------------------------------
Check with the Sony Support, their online documentation and drivers (update or reinstall).
and their forums.Sony - Contacts
http://eSupport.Sony.com/us/Perl/contact-land.plSony - drivers
http://eSupport.Sony.com/Perl/select-System.plSony - Support
http://eSupport.Sony.com/Sony - Forum
https://Forum.sel.Sony.com/?XID=M:Showcase:eSupportI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="">-><- mark="" twain="" said="" it="">->
-
A click on the shortcut to Chrome, was directed to a different Web site. Went to the McCaffee help, now headed to Google, but could not connect. Not a techie, advice? On a laptop with a Router 2 son. Thank you
original title: unable to connect to Google ChromeHello
What operating system is installed on the computer?
You can contact the support of Google Chrome for better assistance.
http://support.Google.com/chrome/?hl=en
Hope this information helps. -
I recently took a class of Microsoft and received the "Welcome" e-mail, but could not connect with the supplied credentials (example below):
Your MC ID: xxxxxxx
Your temporary access code: 18995EBE-BDAF-4883-8F95-64D18D261848
I created a new account with the e-mail MC ID has been sent and it was not recognized. I would like to merge (link) the news and be able to get a fresh copy of my cert. Thank you.
Hello
I suggest you contact Microsoft Learning support team to improve assistance:
http://www.Microsoft.com/learning/en/us/help/assisted-support.aspx
-
My computer is infected with a virus/bug I have checkd with Anti virus few records showed infected but could not withdraw, step by step programs stoped working, I tried all the things microsoft Web and other webs to run antispy etc, but nothing works programs start, but halfway to display error and stop now even explore stop working, now I had a white windoa screen opens more but I have a lot of data that is important, how to fix it? can anyone help please thanks
Raz2009,
If you have a known problem with the virus then I suggest to get an antivirus program that you can boot from and run it without starting Windows.Another option would be to format your drive and do a clean install of Windows (this would remove all the data of your drive). If you have a backup of your data, this is the best course of action. If you do not have a backup, you can then do a parallel install (This installs XP in a different folder if you don't lose any data). Here is an article on installation options: http://support.microsoft.com/kb/316941
Mike - Engineer Support Microsoft Answers
Visit our Microsoft answers feedback Forum and let us know what you think. -
sfc scannow found errors, but could not fix
I have problems with cleaning disc. It runs, but never opens the window after execution. It gives an error at the bottom of the scan window "system error statement qued files.
I ran sfc scannow and it finds corrupted files, but could not fix them.
What should I do now?
Thank you
Jack Bowles
Thanks for your information. I thought it was a waste of time and was upset to have to wait an hour and a half for it ends. I was under the impression that Check Disk would only verify that clusters are only valid as in they can keep information. But Check Disk resolved my sfc/scannow gap with files are corrupt.
In addition, the utility repairman to start ran a test after a missed start and I noticed, he said there is a corrupted driver. She did not mention that now after running the disk check.
All things look good now thanks to your information AirDump. My problem occurred after dust removal on my PC. I think that the plug for the power supply was the problem because he was a coward. Or maybe on the SSD cable was loose?
Thank you very much for your time,
Scott
-
original title: sound problems
Hello!
I tried to record some live audio. I downloadedWondershare Streaming Audio Recorder
I opened the program - but could not hear the audio that I tried to play. I don't know if downloading this program is related to the problem.I opened Skype - and everything worked fine. I could hear, etc. But if I run an MP3 in Windows Media Player - I hear nothing!My sound is at the top.In my Volume mixer, I see:1 output device digital (SPDIF) bounce up and down. (but I don't)2 but applications: sounds of Windows, Windows Media Player and Google Chrome will not move. (but they are at the top).Any suggestions?JewsI managed to get the results of work. I don't know where come the SPDIF.
I downloaded a new driver Realtek for audio from the computer. This corrects the problem.But I still want to know what happened. -
I can hear a wav file, but could not get the video from my camera.
original title: file WAV on Vista
I can hear a wav file, but could not get the video from my camera.
I have windows vista?
Hello
WAV files will be audio only.
You can save this file as an MP4.
B Eddie -
Original title: Top of page desktop icons
Yesterday, while finding how to print a specific file, I have a way diminished my almost invisible desktop icons. I looked on the Panel and control in help & support but could not find something that helped. can someone help me please!
Use system restore to set Windows by two or three days.
-
Hi, I keep getting the error message: Dropbox requires administrator rights to continue, but could not raise (an unexpected error (error unexpected ole32::CoCreatGuid (i sr1) I) when trying to install Dropbox, but I can not install and update other programs.) My antivirus found 3 viruses today and removed. I can't reinstall Windows is an option, but I am abroad now and do not want to do it until I got home...
Please, help :)I think that you have already found a solution for this problem.
But my problem was a little like you, when the box has been commissioning it fails due to administrator permissions.
Solution:
-> Open TaskManager
-> Go to startup
-> Select Dropbox and press the left button of the mouse to properties
-> A obtained the compatibility chart
-> Check the box "run this program as Administrator"
Fact.
-
At the old version of adobe reader and upgrade inadvertently WAA CD player. realized that I could change is no longer with this and tried to uninstall and reinstall and older versiono, but could not. Tried to reinstall the domain controller new version and it would not, indicating that the newer Version is already installed. Nothing in programs and features.
Looks like a job for the cleaning tool: Download Adobe Reader and Acrobat tool - Adobe Labs.
If you prefer XI player, make sure that "Install updates automatically" is not enabled under Edit > Preferences > Updater. It is possible to download and apply patches manually.
-
Is there anywhere I can find a download for Adobe Acrobat 9 Pro for Mac? I have the serial number, but could not find a download.
Hello
Please find the link below to download:
-
Have 13 on PC elements. Although I can hear audio on video playback in HD Writer AE 3.0 when I start a new project and add video to the first edit there is no audio. Tried to help but could not find an answer to my problem. Can anyone help?
I'm glad you found the solution in one of my suggestions, Jon. Please mark this question as answered. Thank you!
-
I buy 6 Lightroom from Amazon, received the album, but could not find a SN which will allow me to start the installation. This sleeve is not, the FN is too short, the other number on the box is only 18 digits. Help
You posted in the wrong forum, this is the forum of Captivate. Can I move this question to the Lightroom forum?
Maybe you are looking for
-
Toshiba Satellite S2410-303 is not BOOT problem
Hello!..I haveToshiba Satellite S2410-303 NotebookP4 1700/256 / 30 G, 15XT, CDW, LMand had Windows XP home.I use my cell phone without a network.When I push the power on the laptop, it isNo not from Windows XP. I just see "contact tomorrow with TOSHI
-
Qosmio X 770-Crysis 2 fails and an eye glued
I have a Qosmio X 770/00 X PSBY5A-00X01D When you play Crysis 2 with the new pack of DirectX11, 3D fails. An eye gets stuck (watch the same screen). Google results talk about updating the nVidia Driver, but it won't support Nvidia. Download of the up
-
DeskJet 2540: cartridges in Europe to the United States model Deskjet 2540
I bought the Deskjet United States about 2 years ago and now moved to the Poland 2540. I just bought the catrirdges ink 301 which are supposed to work for this printer (I couldn't find the 61 cartirdges in Europe) and seems that it does not work. cou
-
standard with a state machine controls
Hello I read with VISA to a serial device. I am writing for the series the start character and the device sends data. Now after reading the data, I want to stop sending in writing to the series a stop character. Separate loop is playing. I want to do
-
LaserJet 1018 - cannot print documents
The printer has been connected to my router so it can be shared. He worked like that for a few months, but a few weeks ago, my wife said that she could not print word or pdf from his laptop (Win 7 32). She was able to print a test page so that she co