How truncates a number and another number different online?
Here's an example where I take a percent of a number.< code >
SELECT 40*.5 AONE, 'A' aname
OF THE DOUBLE
UNION ALL
SELECT 121*.5 AONE, aname 'B '.
OF THE DOUBLE
UNION ALL
SELECT 121*.5 AONE, aname 'C '.
OF THE DOUBLE
UNION ALL
SELECT 80*.5 AONE, 'd' aname
OF THE DOUBLE
< code >
It gives me
20A
60.5 B OF
60.5 C
50%
I want a single number TRUNC and ROUND another number where the number has a
"0.5" so I will
20A
61B
60 C
50%
I'm having more than 4 files, just trying to keep things simple.
Suggestions?
TIA
Steve42
Published by: Steve42 on December 5, 2011 13:44
I missed you only want to truncate/round where the fractional part of value is. 5:
WITH SAMPLE_TABLE AS (
SELECT 40*.5 AONE, 'A' aname FROM DUAL UNION ALL
SELECT 121*.5 AONE, 'B' aname FROM DUAL UNION ALL
SELECT 121*.5 AONE, 'C' aname FROM DUAL UNION ALL
SELECT 80*.5 AONE, 'D' aname FROM DUAL
)
SELECT CASE MOD(ABS(AONE),1)
WHEN .5 THEN
CASE MOD(ROW_NUMBER() OVER(ORDER BY CASE MOD(ABS(AONE),1) WHEN .5 THEN ANAME END NULLS LAST),2)
WHEN 1 THEN TRUNC(AONE)
WHEN 0 THEN ROUND(AONE)
END
ELSE AONE
END AONE,
ANAME
FROM SAMPLE_TABLE
ORDER BY ANAME,
ROW_NUMBER() OVER(ORDER BY CASE MOD(ABS(AONE),1) WHEN .5 THEN ANAME END NULLS LAST)
/
AONE A
---------- -
20 A
60 B
61 C
40 D
SQL>
SY.
Published by: Solomon Yakobson on December 5, 2011 17:05
Tags: Database
Similar Questions
-
How to find number of online user clicks in multicolumn Listbox
Hello
I'm trying to find the line number of the clicked point right in the (MC) Multicolumn list box.
Scenario:
I have activated the menu custom for multicolumn Listbox
When the right-click on a line in a listbox multicolumn, I need to know the number of the clicked point straight line in Listbox MC.I can find property Row in the structure of the event for Listbox MC double-click on the event, but the same is not available for the event from the popup menu.
Ajay-
The MC listbox has a method called Point to the row column. Call this method in the case of business and give the data of the terminal of coords in the event of activation of the menu. It will return the clicked cell.
-
How can I download and reinstall Adobe Photoshop Lightroom after a reinstall of Win 10 on my computer? Number of available license.
Download links here:
-
I transferred my Lightroom 5.7.1 my cell phone to my PC. I put in the serial number, you press "next" and another box came up saying that the updated code was for and upgraded version and I should put in the old version the serial number - this that I can't find
you will need to this previous version number and serial number.
If you purchased the previous version of adobe or registered with adobe, check your account: ID Adobe
in otherwise, find the serial number of your product Adobe quickly
-
I have a number of VIP to order my software. The licency has already been paid. How can I download and install the software?
Download/install the desktop application, connect and install applications subscription.
https://helpx.Adobe.com/creative-cloud/help/download-install-app.htmlCreative cloud to desktop
https://helpx.Adobe.com/creative-cloud/help/creative-cloud-desktop.htmlSign out, sign in | Creative office cloud app
http://helpx.Adobe.com/creative-cloud/KB/sign-in-out-creative-cloud-desktop-app.htmlHelp of activation & deactivation
https://helpx.Adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html#a ctivate-how-to'sInstall, update, or uninstall applications
http://helpx.Adobe.com/creative-cloud/help/install-apps.htmlInstall creative Cloud applications
http://TV.Adobe.com/watch/CS6-creative-cloud-feature-tour-for-video/installing-desktop-app s-of-creative-cloud. -
I bought the 12 photo shop elements. It came with a disc, but my mac does not have a disk. How can I download and enter my serial number on the disk for the installation?
You can download items online instead. Please see the following links for the files:
Photoshop elements 13, 12, 11, 10 | 9, 8, 7
First items 13, 12, 11, 10 | 9
Guinot
-
List of exceptions of the cookie - how you save, copy and reload it to another Firefox instance on a different machine? What is the name of the file/s used?
I need to upgrade the machines regularly and waver not to have to retype all those addresses cookie blocked in each new instance of Firefox.The file "permissions.sqlite" stores exceptions 'allow' and 'block' for cookies, images, pop-up windows and installation of extensions (software).
-
How to keep specific splash screen for portarit and landscape mode images. for example, I have one 360 x 640 image for portarit and another image of 640 x 360 for the landscape.
The two are different
When the user holds the phone in portarit specific Portrait image should appear
Similarly when the user holds specific landscape landscape image must be indicated without changing the quality of the image.
IAM answer showing 1 portarit boot image using the
Hi srk2012,
You cannot apply 2 different splash screen inames for OS5, 6, 7.Check this link https://developer.blackberry.com/html5/documentation/rim_splash_element.html
Thank you best regards &,.
Laurent Subudhi -
How to get number of a character Page?
Currently I get a character by CreateOutlines Page
Dim oaPols = oChar.CreateOutlines (False)
Download oaPols (1) page of the object.
But sometimes Indesign was the crash by this code: Dim oaPols = oChar.CreateOutlines (False)
How to get number of a character Page?
Willi Adelberger wrote:
Why do you do the contours? It should NEVER be done in InDesign!
Hey Willi,
the OP is trying to find a method to get the page name of a character given somewhere on a page or on a spread and use a VB-Script scripting method.
The False parameter in the method indicates that the character will be duplicated on top of the character as an outline object.
In the user interface you select a character and press and hold the ALT key when you use the menu command for this.Usually we take the object returned after obtaining the information of her by the script.
But obviously something bad on the side of the OP, because InDesign crashes if this method is used on one of the sample characters. Usually a geometrical object on a page will return the page object as the value of his property in parentPage (ExtendScript).
I'm not in VB-Script, so here's an excerpt from ExtendScript to get the name of the page in the text of a character block.
Select a character and run the code snippet:
// ExtendScript (JavaScript) snippet // One single character should be selected: var myCharacter = app.selection[0]; var result = myCharacter.parentTextFrames[0].parentPage; if(result == null) { alert("Character's text frame is considered on the pasteboard") } else { alert("Character's text frame is considered on page: "+result.name) };
Now, back to the createOutlines() method.
It would fail on for example all white space characters and characters that represent a fixed page element.
It would also fail if the character is in the overset text.
createOutlines() would be to raise an error, but should not crash InDesign.
Now go to the OP to the following questions:
What is the character that you try to use the method with?
Is there excess in text?
What is your exact version of InDesign?
What is the exact version of your Windows operating system?Kind regards
Uwe -
How do I know how much the number of materialized view columns
How do I know how much the number of materialized view columns
Thank you
Gopal
Best to include the owner too if you use all_tab_columns
Select count (*)
from all_tab_columns
where owner = "
." and table_name = "
." -
Moving bookmarks from URL in Firefox from one Mac to another
How do I drag-and - drop my web "Bookmarks Toolbar" folder from a Mac to an external zip USB drive. Mac network and use the feature of migration impossible. Need to proceed manually. Thank you!
Hi RMcMullen,
You should look at article in the Knowledge Base to back up and restore the information contained in the profiles of Firefox . It will give you all the information you need to save everything so you won't lose a thing.
Hope this helps!
-
How to take a column of duplicate names and fill a different column with the same names, excluding duplicates?
I find easier to use this copy separate Automator Service (download Dropbox).
To install in your numbers > Services, double-click menu just the package downloaded .workflow and if necessary give permissions in system preferences > security & privacy.
To use, just:
- Select the cells in the column with duplicate names.
- Choose separate copy in numbers > Services menu.
- Click once in the upper cell where you want the deduplicated values appear.
- Command-v to paste.
SG
-
How can I download and have another language?
Hello
How can I download and add another language to those on my laptop without the windows disc?
Hello
Only Windows 7 ultimate or Windows 7 Enterprise Edition can have:
https://support.Microsoft.com/en-AU/KB/972813
What is yours? You can follow the instructions to download.
Kind regards.
-
Microsoft Outlook is not compatible with my email. How can I change this to a different email address. It opens and gives me the email that it is not compatible.
I need to put up with my hotmail account.
Hi CarolBehrendt,
- What e-mail program other than Microsoft outlook use?
You must validate your application in the Windows Live community to know how to configure the hotmail account in the e-mail program you want to use.
Maybe you are looking for
-
Find friends - notify doesn't work do not
Hello Several times I put my FMF notify to warn me when a friend leaves or arrives at a place. There ever me notified. I often checked their site and found they left, or happened to succesfully destinations, but not once FMF warn me! I've performed t
-
The pop-up window appears in the bottom left of the browser Firefox. Yet once, it displays the URL by clicking on the image for each image on the Web page.
-
How do you manage automatic renewal on subscriptions
iPhone 6 IOS9 How are they managing automatic renewal subscription on some apps
-
No area of HDD on the Satellite A300-203
Hello! I have a laptop satellite a300-203 and I want to recovery factory but anyway when I try it says no hard disk space, restart the computer and press F8 to recovery from there with the recovery dvd but when I insert reinstall drive nothing anyway
-
T43 F7G 2668: upgrade memory 2 G
Hello world I would like to upgrade my old T43 to 2 G memory. Questions: Is it a good idea to deploy 2 modules of "Kingston KTM-TP3840 / 1 G" (533 MHz). If not, what else? Is it necessary to configure the bios thereafter to get the recognnized of mem