Query to find records with more than 2 decimal places.

I have written the below query to find records with more than 2 decimal places, but it is returning records with decimal places 1 & 2. 
The datatype of the AMT column is NUMBER (without any precision).

SELECT amt  FROM amount_table
 WHERE substr(amt, instr(amt, '.')) LIKE '.%'
       AND length(substr(amt, instr(amt, '.') + 1)) > 2
Output:-

AMT

* 41591.1*
* 275684.82*
* 64491.59*
* 3320.01*
* 6273.68*
* 27814.18*
* 30326.79*
131.8413635
162.5352898
208.5203816
8863.314632
22551.27856
74.716992
890.0158441
2622.299682
831.6683841
* 1743.14*
2328.195877
3132.453438
5159.827334
3.236234727
37.784
Thanks

Hello

user1585440 wrote:

when i inserted fee_amt as 41591.0999999999  it is displayed as 41591.1 in the output i.e,

insert into amount_table (line_number,fee_amt) values (100,41591.0999999999);

select fee_amt from amount_table  where line_number = 100. this query shows the output as below

fee_amt

41591.1

The fee_amt column has number as datatype (without precision)

Why it is automatically shown rounded off as 41591.1? 

Published by: user1585440 on December 28, 2010 04:50

You use SQL * more your front end?

SQL * Plus has a fixed width to display all columns. The default for numbers is 10 characters. If necessary, SQL * Plus will be round a number or the use of scientific notation, to represent the number of the expected number of characters.
You can use the SQL * more "SET NUMLARGEUR" to change the default view for all the numbers of orders, or "COLUMN" to set a sepcific format in an individual column.
If you explicitly convert your channel numbers in a query, SQL * Plus adjusts the column width to whatever is needed. For example

SELECT  TO_CHAR (fee_amt, 'TM')     AS fee_amt_d

"TM" is the default format; You can call TO_CHAR with a single argument, if you prefer.

Tags: Database

Similar Questions

  • I can record is more than all of the new bookmarks after update to Firefox 40.0.2. I have over 1000 bookmarks and also use xMarks.

    I can record is more than all of the new bookmarks after update to Firefox 40.0.2.
    I have over 1000 bookmarks and also use xMarks.
    I tried to remove 5 bookmarks and save a new bookmark, but it does not work.
    When I click on the bookmark star, stars in the bookmarks folder jumps, but does not record, it does not offer the possibility of filing in the subfolder right it me and the star is not awarded (there should be one filled with stars when the Web site is updated bookmark)

    Thank you for your help. I tried the maintenance of places without success. I have disabled xMarks, but it made no difference, I couldn't save all new bookmarks. I went on the site help above and deleted the "places.sqlite" file and recreates a new file, but it didn't work. I uninstalled Firefox full using IOBit Uninstaller and reinstalled, but I found this program does not delete the profile folder (used to have a checked during uninstall of Firefox, but it seems to have disappeared in the latest versions). The problem persisted.

    Finally, I took a screenshot of all my addons. Then, I uninstalled Firefox again, then delete the entire folder profiles (located very usefully described in the second link above https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file )
    I reinstalled Firefox, reinstalled xMarks and connected and transferred all my favorites, I reinstalled all my previous addons and ALTO - it now everything works perfectly!

    Thank you for your help

  • Remove the Finder tags in more than 10 items at a time

    Is it my setup or a remove the tags in the files of more than 10 changed in OS X 10.11?

    I used to add or remove tags at will. But now it seems that I can only take off the mark max 10 files at once via ctrl + click or Finder > file > Tags... With more than 10 points, the delete tag option is not available.

    If I want to remove the brand more than 10 files, I have to ctrl-click > read the summary information (more than 40 items will automatically in this mode), THEN batch-deletion of tags.

    I noticed that today, as well. It works fine for 1 to 10 items, but when you select that item 11 (or), it highlights all the tags, as if you have all the applied, rather than just a you have on them.

    Seems like a bug to me, but I'm not sure.

    I've found a workaround, if:

    Click on the word "Tags"... "above the points colored. Then, in the white field where the current tags assigned to this item, click the tag you want to delete, and then press the delete key.

  • Win7 Pro XP Mode with more than 4 cores of the processor installed

    There is a small class of Windows 7 users in a particular section.  Leave section A Win7 users with more than the standard 4 hearts of the processor installed, in some cases, several times more.  Or B article Win7 users "legacy Software".  Note that "legacy software" not only old XP/32 software but also includes some advanced technical software for which the latest version is not stable on Win7 or Vista, and which also does not work on any operating system other than Windows.  People who reside in sections A and B, called 'Goblet' hereby shall Win7 Pro XP mode.  However, XP mode currently fails to install the last step with no further comment or recommendation, for all people in the section AxB.  There is a related hotfix KB2519949 which covers the series of chips AMD 8-core Bulldozer.  Microsoft has indicated that KB2519949 is highly specific instance and emits a strong caveat.  The fix may not work and may even be unstable on some systems.  Miscrosoft indicates on page Web KB2519949 further research is necessary.  I need to install XP mode and the Virtual Machine on Win7 Pro with 2 x Intel CPU E5-2620 (24 hearts).  I would accept that XP mode can run on only a subset of my installation of CPU, but only on condition that this does not affect my full CPU installation and proper use on Win7.  This is part of my doctoral research, and the problem has delays.

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the Windows Virtual PC and XP Mode Forums.

    http://social.technet.Microsoft.com/forums/en-us/w7itprovirt/threads

  • Tables compressed with more than 255 columns

    Hello

    Anyone for a sql to find tables compressed with more than 255 columns.

    Thank you

    Jonu

    SELECT table_name,

    County (column_name)

    Of utc user_tab_columns

    WHERE utc.table_name IN (SELECT table_name

    From user_tables

    Compression WHERE = "ENABLED")

    HAVING Count(column_name) 255 >

    GROUP BY table_name

  • The AirPod are compatible only with iphone 7? Or we can use it with more than 6 s... or any android device?

    The AirPod are compatible only with iphone 7? Or we can use it with more than 6 s... or any android device?

    Here are the tech specs: http://www.apple.com/shop/product/MMEF2AM/A/airpods

    They are bluetooth devices, so they work with the iPhone 5 or more.

    See you soon,.

    GB

  • After using groups of tabs earlier today, now whenever I close FF with more than 1 open tab, FF don't ask me to confirm before closing

    After using groups of tabs earlier today, now whenever I close FF with more than 1 open tab, FF don't ask me to confirm prior to closing. FF always asked me to confirm in the past and no settings have been changed before you try tab groups. Then when I open FF it again all the tabs I had open are still there. I tried refreshing FF and erase history, but that did not work. It's almost as if FF think windows and tabs I have open are a group of tabs, and he won't let me get rid of this group. How to stop groups of tabs now that I have them? Or is there something else? None of this was going on until this morning, I played with tab groups. I was curious what it was - it's going to make me kill one of these days lol.

    Note that using "show my windows and tabs from last time" as the start setting will also prevent Firefox to display an alert when you close the window.

  • 5.6.1 pages: How to create a table with more than 999 lines?

    5.6.1 pages: How to create a table with more than 999 lines?

    The table on Pages v5.6.1 line selector is limited 3-digit, as it is in Pages ' 09 v4.3. Either use LibreOffice Writer, who does not have any constraint line on processing tables 3-digit, or any application spreadsheet for top 3-digit row needs.

  • Noisy HDD downloading with more than 2 Mbps Internet

    When I download with more than 2 Mb/s to the internet, I hear a noise continuous scratchin/scratching. After I stop downloading the noise disappears. It has 5000 hours working time.

    Toshiba 120 GB SATA/300 5400 RPM 8 MB 2.5 "MK1246GSX...

    Hello

    First of all I must say it is really hard to say something about it without having heard this noise you want to say.

    Generally speaking, it of normal that you hear some noises during writing or reading process of the HARD drive.
    You can test your HARD drive for bad sectors using Drive Fitness Test. Which is a freeware tool that can check the HARD disk.

  • After migration, iPhoto again takes massive space on the hard drive? My system is showing iphoto and photos with more than 100 GB of space each. I once picture is merged uses always massive GB of space? Thank you.

    After migration, iPhoto again takes massive space on the hard drive? My system is showing iphoto and photos with more than 100 GB of space each. I once picture is merged uses always massive GB of space? Thank you.

    # Multimedia files are hardlinked.

    (141516)

  • When we try to use our multipoint system 2010 with more than 2 users the mouse around the screen to move.

    Original title: problems using multipoint server 2010.

    When we try to use our multipoint system 2010 with more than 2 users mice become uncontrollable and move the screens themselves. How to fix this.

    Hi thomasgk,

    The issue of Windows Multipoint Server 2010, you have posted is better suited for the IT Pro TechNet public. Please ask your question in the TechNet forums for assistance.

    Hope the helps of information.

  • How can I associate my rt surface with more than one account of sky drive

    How can I associate my rt surface with more than one account of sky drive.

    You will need to create a new account on the computer by using the Microsoft Account associated with the other SkyDrive.

    To create a new user, open laptop settings, in the general section, click 'add a new user '.

  • Can I have my HP mini 210-2080NR updated with more than 1 GB of RAM it came with?

    I have a HP mini 210-2080NR. I would really like the amount of RAM upgraded fom the he arrived with more than 1 GB. Is this possible and if so, how it will manage?

    Hello

    Yes you can, you can upgrade to 2 GB and because she has only 1 slot you have to throw 1 GB and 2 GB, put on it. I replaced the RAM for my daughter about 2 months back. He encrypted his 28 our Australian dollars and 5 minutes of my time.

    Kind regards

  • Hello, I want to build several video clips with more than 500 images (pictures) of each clip. I need to apply a different video transition effect to each photo. It might even be random effects. I see that I can apply a unique to all p transition effect

    Hello, I want to build several video clips with more than 500 images (pictures) of each clip. I need to apply different transitions video effects by alternating each photo. It could be random effects. I see that I can apply a unique pictures transition effect at the same time, but how to apply different transitions not one by one? I could do a clip applying different transitions manually as I wish between hundreds of photos, but I would like to be able to repeat all the transitions of a new video by changing only the photos. Is this possible? Or a tool to apply random transition effects between photos? Or a way to automate the actions to apply different transitions similar to what we can do in Photoshop? Thank you!

    But how to apply different transitions not one by one?

    You can not.

    If you wish to make a slideshow with all the transitions better fantasies use something like Pro Show gold.

    Alt drag window project replaces clip/still on the timeline.

  • I have problems to download from a Web site with more than 100 pages. The download is stuck at 6%. Muse has a page limit? I use Adobe Muse CC 2014 v7.4

    I have problems to download from a Web site with more than 100 pages. The download is stuck at 6%. Muse has a page limit? I use Adobe Muse CC 2014 v7.4

    425 is the error that you have been doing all along? That looks like a firewall or router problem or a server side hosting configuration problem.

Maybe you are looking for

  • What is "Safari-Script' attention...?

    I can't take this warning to script out of the app from Google Chrome safari on my IPhone 5. IE I need to call Support technique Apple to 1-888-508-0892. It is a real number...? Help, please!

  • Equium L10: No drive in my computer and BIOS

    Well, the DVD on my laptop disappeared, not only in work, but from the BIOS as well, there no player from the list when you browse. I've already updated my BIO just to be sure, but still had no luck, any thoughts anyone?

  • ENVY 15-j054ca: fingerprint fingerprint reader windows 10

    Hello I had to update my laptop and now I'm going to download applications and software. I have problems to find the software for my laptop fingerprint reader. Can someone help me, please? Thank you Flavia

  • HP Officejet Pro 8100: unable to operate a printer wireless with new router

    The HP Officejet Pro 8000 has worked successfully for a year on a home network with 3 computers wireless using an internet ATT Uverse router.  The router was changed to another new router with a different network name and the WiFi password ATT Wirele

  • List of devices

    Hello Can I get a list of devices using DAQmx and ANSI C? How can I do? What function can I use? I was looking for a solution in the internet, but I couldn't find that for c#: http://zone.ni.com/devzone/cda/epd/p/id/5818 . Is it possible in ANSI C to