decode and sign up to get the percentage
Good evening
I'm trying to understand how to use decode and sign to return the correct percentage
for example, we have
amount1 = 3000
Amount2 = 2000
SELECT Round(((amount1-amount2) / amount1)*100,2) from dual;
return to 33.33%
This is the reason why I need the decode.
In the case where amount1 is 0-100% will result
in the case where amount2 is 0 the result will be 100%
in the case where both amount1 and amount2 are 0 the result will be 0%
How can I achieve this?
Thank you for your time
Hello
The answer to "How can I use DECODE to...» "is 'do not use DECODE; Instead use CASES. "If you have to ask, DECODE is the wrong tool for the job.
Here's one way:
SELECT ROUND (CASE
WHEN amount1 = 0
AND amount2 = 0 THEN 0
WHEN amount1 = 0 THEN - 100
OTHER 100 * (amount1 - amount2)
/ amount1
END
2
) AS pct
FROM table_x
;
If you would care to post CREATE TABLE and INSERT statements for some sample data and the results that you want from this data, then I could test this.
Tags: Database
Similar Questions
-
Hello. Recently, I buy the suite adobe for students. I also paid for two months. But in my profile it says I have a free plan for testing applications. And I can't get the entire application. How can I solve this?
Your subscription to cloud shows correctly on your account page?
https://www.adobe.com/account.html for subscriptions on your page from Adobe
If you have more than one email, you will be sure that you use the right Adobe ID?
.
If Yes
Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud
-Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
-http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
-http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
-http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
-ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp
-http://helpx.adobe.com/creative-cloud/kb/license-this-software.html
.
If no
This is an open forum, Adobe support... you need Adobe personnel to help
Adobe contact information - http://helpx.adobe.com/contact.html
Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">===>
-Select your product and what you need help with
-Click on the blue box "still need help? Contact us. "
-
Hello! I have download CC and paid $69.99 but I want to use the programs that I pay for, why, if I pay $69.99, I have to use the test programs? you want to know what I pay and how I can get the services of programs I want to use.
Miguelo28272279 for more information on how to solve the connection error preventing your membership to authorize please see sign, activation or connection errors. CS5.5 and later, Acrobat DC. We invite you to update this discussion if you have any questions about the steps listed in the document.
-
I paid for CC (photography) and yet I still get the message that I'm in the 'trial period' when I open Photoshop. Please tell us what should I do to solve this problem.
Hi Raoul,.
In addition to the steps above, you also follow instructions on the link below.
Applications creative Cloud back in test mode after an update until 2015 for CC
In case you are working on a windows machine and after following the instructions above, you still encounter the same problem, can you please review the instructions below.
- Restart the computer in safe mode with network.
- Immediately after the computer is turned on or restarts (usually after your computer beep), press F8 at 1-second intervals.
- After that your computer displays hardware information and performs a memory test, the Advanced Boot Options menu appears.
- Use the arrow keys to select Safe Mode or Safe Mode with network and press ENTER.
- Please sign out and sign back for the creative Cloud Desktop Application and verify that the subscription is not trial showing.
- Restart the computer and check the creative Cloud Desktop Application.
Hope this will solve your problem.
Kind regards
Hervé Khare
- Restart the computer in safe mode with network.
-
Y at - it a newsletter I could sign up to get the latest beta versions of Microsoft?
Y at - it a newsletter I could sign up to get the latest beta versions of Microsoft?
No, it's not...
-
I just reinstalled XP pro and I can't get the updates from the windows update web site. Whats up with this please help
There is no way that anyone might be able to help without more. My initial guess and it is just a guess, is that you have to update Internet Explorer .v8. Click HERE and download IE8 and install it. Try again updates once the installation is complete.
-
I use Windows XP and on startup, I get the message insert the disc from center of solutions?
You have one something or other HP connected to the PC? Check the CD-ROM that
came with it. Otherwise, contact HP support. -
How and if I can get the Vista OEM disc.
How and if I can get the vista OEM disc. Install win 8 did not know that it would take on my vista os that Microsoft wants everyone to high grade don't like win 7 and win 8 is not working properly I want to reinstall vista. Laptop has been used without disk key code.
Hello
There is no Windows Vista downloads available from Microsoft.
You can contact your computer manufacturer and ask them to send you a set of recovery disks.
They should do this for a small fee.
To reinstall Vista using their recovery disk/s, you start from the 1st recovery disk they provide and follow the manufacturer's instructions to reinstall:
You need to change the Boot order to make the DVD/CD drive 1st in the boot order:
How to change the Boot order in BIOS:
http://pcsupport.about.com/od/fixtheproblem/SS/bootorderchange.htm
"How to replace Microsoft software or hardware, order service packs and replace product manuals.
http://support.Microsoft.com/kb/326246
Some manufacturers have more available Vista recovery disks.
If this happens, you may need to try this instead:
You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.
Other manufacturers recovery DVDs are should not be used for this purpose.
And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs
Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:
"How to do a clean install and configure with a full Version of Vista '
http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html
And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.
And phone Activation may be necessary when you use the above installation method.
"How to activate Vista normally and by Activation of the phone '
http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html
See you soon.
-
I have a HP computer and I try to get the best performance on it
Dear community,
I have a HP computer and I try to get the best performance on it, but it does not work. I try to update the drivers and use the memory of storge on USB keys and other stuff like using Microsoft Security Essenticals it is sort of: wered because there is no no way around my problem that way happens to you guys, please I want to just play and have the best performance that I can handle it.
I think I'll put my memory to 8 GB of Ram or 16 GB of Ram.
Thanks for your help.
Original title: Windows 7 HP 2000-369WM
Hello
Before upgrade you your RAM, check at HP for the specifications of your computer to see what max amount and type of RAM your motherboard will / can use, or download and run the Crucial Scanner:
http://www.crucial.com/USA/en/systemscanner
Also, if you use Windows 7 32 bit, 4GBs is the maximum RAM that can be installed, with the exception of Starter which is 2GBs.
If you are using Windows 7 64 bit, what are the limits of RAM max for each edition (there is no Starter 64 bit)
Home Basic 8GB Home Premium 16GB Professional 192GO Enterprise 192GO Ultimate 192GO _________________________________
And follow these steps to keep your device works properly:
Search for malicious software with the FREE version of this program.
This is the right link to download included.
And does not accept the option "Pay for the version" trial installation
Download, install, update and scan your system with the free version of Malwarebytes AntiMalware:
http://www.Malwarebytes.org/products/malwarebytes_free
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
You can clean your hard drive using these two methods.
"Delete files using Disk Cleanup"
Using the free CCleaner program:
http://www.Piriform.com/CCleaner
In NO case use the registry cleaning Option in CCleaner
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
And it is not recommended to use a register or a program of cleaning/TuneUP/utilities they can do more harm to your any good operating system that they claim to be able to do.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Make sure you have the latest updated drivers:
Access the site on your computer or equipment manufacturing > Driver and Software Support Section > search your computer or hardware model number > then your operating system > locate the correct drivers > download and install.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
What are the other steps, which does not include some of the above:
"Optimize Windows for better performance.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
It would be a good idea also run the System File Checker tool to check that everything is correct in the system files.
"How to use the System File Checker tool to fix the files on system missing or corrupted on Windows Vista or Windows 7"
Use the (SFC.exe) System File Checker tool to determine which file is causing the problem and then replace the file. To do this, follow these steps:
- Open an elevated command prompt. To do this, click Start, click principally made programs, Accessories, right-click guest, and then click run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click allow.
- Type the following command and press ENTER:sfc/scannow
The sfc/scannow command analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.
See you soon.
-
I bought Photoshop elements & elements of Prime Minister to Best Buy 2 years. Finally opened and I tried to get the serial number online by using the identity card, but said website code is not valid. Called Best Buy, they said that adobe should have canceled activation because it has not been installed in a timely. How can I get a serial number for installation?
jotison64 wrote:
I bought Photoshop elements & first items at Best Buy 2 years. Finally opened and I tried to get the serial number online by using the identity card, but said website code is not valid. Called Best Buy, they said that adobe should have canceled activation because it has not been installed in a timely. How can I get a serial number for installation?
Work your way through this document in the end, step by step, and finally try to start a chat session. I hope that Adobe will straighten this out for you.
-
How can I update my version of Adobe Captivate, I have version 8 and I want to get the version 9
Go to the sales and purchase the new version
-
Hi, I just bought Photoshop and I don't get the link to install it
Hi, I just bought Photoshop and I don't get the link to install it
You bought subscription CC?
In the affirmative. You can check the link below:
-
I downloaded creative testing Cloud, Dreamweaver and Muse. I get the following error message when you try to start the Dreamweaver application '... Unable to start properly. 0xc000007b'. Muse starts without a problem. Is there something wrong with the download trial of Dreamweaver or is it my computer? I downloaded the Windows 7 premium, Intel, processor Pentium B940 2.0 ghz, 4 GB ram, 64-bit operating system.
... 07 b problems http://forums.adobe.com/thread/1355374?tstart=0
-
I pay the annual fee, and I don't get the edition...
I suspect that you will need Acrobat (Standard or Pro). You can purchase a license (perpetual or subscription). Download the installation program, then let it install the desktop application.
Acrobat is not a 'cloud' application or mobile device (Finally, a computer laptop/netbook/ultrabook/surface pro / thingy is 'mobile' - but no tablets)
Be well...
-
I can't download lightroom cc because "adobe does not support the system" I use. How the hell am I supposed to know what system he supports and how do I get the system that God Adobe says that I have? Googling lightroom cc requirements does not help.
System requirements | Creative cloud
The system requirements (lightroom)
Maybe you are looking for
-
Only a portion of the original message is displayed with a blue bar beside him, like this: 14/05/2014 14:24, Vince Mariner wrote:This table summarizes the use of e-resources by eCard users who have access to electronic resources directly from the por
-
Speakers get muted when headphones are connected
HP TouchSmart 520 Windows 7 The built-in speakers put muted when headphones are connected.
-
I have improved my battery life of Lenovo K3 score of 50% more with Greenify!
Hi friends, I have improved my battery life of Lenovo K3 score of 50% more with Greenify! It works really well. You can try it via the game shop. Don't forget to give your comments once you have started using it. Greenify essentially stops (or streng
-
Original title: WINZIP HELP I have windows professional xp and when I try to attach a file to an e-mail or even see where I saved them they do not appear. I'm looking for all THE files, but no zipped files are there. Help, please!
-
Standard account included games problem
Hi all Sorry if this has been answered elsewhere, but I found nothing. The problem I have is that I have a Win 7 64 bit PC with user accounts four, two administrator and two standard (for children). On two standard accounts, you cannot open the games