Determine the decimal when precision is not defined in the structure of the table

Hi all

I'm trying to quickly determine the decimal precision of data in more than one column of the table. Fields can simply be defined as 'Number', but always decimal of the House. I don't mean to round to a certain place of the decimal, but rather to determine the maximum number of decimal places contained in the data of a particular field.

I wonder if anyone of you know a trick to achieve?

Thanks for the tips!

andy_schnelle wrote:
Hi all

I'm trying to quickly determine the decimal precision of data in more than one column of the table. Fields can simply be defined as 'Number', but always decimal of the House. I don't mean to round to a certain place of the decimal, but rather to determine the maximum number of decimal places contained in the data of a particular field.

I wonder if anyone of you know a trick to achieve?

Thanks for the tips!

Just a guess

LENGTH(NUMBER - TRUNC(NUMBER)) - 1

Something like that?

with zz as(
select 1.111 x from dual union all
select 1.1 x from dual union all
select 1.1111 x from dual union all
select 1.01 x from dual union all
select 1 x from dual
)
select
MAX(LENGTH(x - TRUNC(x)) - 1)
from zz;

Output -- "4"

Published by: Vanessa B on February 13, 2013 02:13

Tags: Database

Similar Questions

  • How to stop loading hospitality when startring firefox 6. When it is not defined in the options area

    I've just updated to Firefox 6 and every time I open the browser, the home page loads to the sides of my home page. Both Cooliris and Foxtabs 1.4 did the same thing, I disabled those.
    It is not set as homepage alongside or with my own desired opening site

    See the following for a few suggestions:

  • Clone tool offsetting the source when it is not defined

    I did not put the Clone Stamp tool to any compensation other than where I place, but if I click on more than one occasion, he step duplicates the source.

    I can not find anywhere the causes is not the zone 'Of Frame Offset' clone of the source Panel and which is set to 0.

    Someone has hot ideas to stop?

    Thank you!

    -Renee

    I closed and restarted Photoshop and the clone tool is now normally.  I still have no idea what caused his step double my source point. But at least he does more.

  • How will we move page numbers just a bit when they are not defined by using a master page?

    Forgive me if this is super obvious, but I am very new and meet with an INDIVIDUAL who has a hard time finding.

    So I have a book w / page centered at the bottom of each page numbers. This seems to remain separated from body text. My understanding is that the best way to manage the headers and footers is the master pages feature, but one that has made this book, all of these master pages left blank. I'm not sure how they apply page numbers.

    I can easily select page numbers, one at a time and move them up to 5pts, but is there a way to make it more automated? If this isn't the case, it is more precisely, it is a way to move ALL content on all pages to the top of 5 points instead?

    Thanks in advance for any help.

    Apart from via a script, no there is no way to do this in InDesign. According to the number of pages you have, I simply add the page number automatic on master pages and then erase individual numbers on each page. In this way, you can move them easily in the future. To insert the automatic page number, draw a text frame on the master page and choose text > insert special character > markers > current Page number. If it is a document of face page, copy it into the two pages in the position you want.

  • What would cause a Subvi show its FP even when it is not defined to show (by default)?

    I have a Subvi suddenly decided to show even when it should.  What kinds of things would cause this?

    Thank you!


  • Date of end of QueryAvailablePerfMetric works is not when to start, and intervalid is not defined

    The method QueryAvailablePerfMetric in the Performance Manager management entity has optional intervalId beginTime, endTime parameters. I say required because these settings are played saying "you don't need to be activated. However when they are not defined then we receive NPE to the method call. It works only when it is provided with all the settings.

    Hello

    I tried to call the QueryAvailablePerfMetric API at my end, passing only the reference entity VM, through the CROWD and he sent me back all of the counters available on this virtual machine and did not return a null pointer exception. I wanted to check with you if you can share your snippet of sample code when calling this API.

    Thank you

    Angela

  • Element not defined by structure error

    Receiving an error when I run the code that says "Evaluation of the element is not defined in a structure CFML referenced as part of an expression.  I can't paste the code into the editor for some reason any.  Please click on http://pastebin.com/2A059LEE to go to the source code.  Please click on http://pastebin.com/31a2qEYS to go to the error page.  Any help would be greatly appreciated. 

    Actually no, it's more simple than that. On line 53, you set the value in a structure called "structJobType". On line 79, you reference a structure called "structJobStatus". Completely different struct.

  • When I run Mozilla Firefox I get the error message "ReferenceError: Globalstorage is not defined." How to solve this problem?

    When I run Mozilla Firefox I get the error message "ReferenceError: Globalstorage is not defined." How to solve this problem?
    -Vinayak

    GlobalStorage is no longer supported in the current Firefox (removed in Firefox 13), versions so the extension or Web site that uses it needs an update and use localStorage instead.

  • I signed up for photography CC, loaded on laptop main, when installing on my ASUS Transformer to only LR5.7 not CRD.  Determine the latest version that a device can run install?

    I signed up for photography CC, loaded on laptop main, when installing on my ASUS Transformer to only LR5.7 not CRD.  Determine the latest version that a device can run install?

    Yes.

  • Get ReferenceError: Error #1065: Variable Transform3DController is not defined. When you use the debugging.

    Hello

    I just upgraded my Flash Builder to 4.6. Since the upgrade I get the following error right when I run my web files through debugging:

    ReferenceError: Error #1065: Variable Transform3DController is not defined.

    Global / flash.utils::getDefinitionByName()

    at ominds.mouseinspect::MouseInspector/onTmd3dModuleLoaded()

    I don't know if it came from the new update to the constructor or if it comes to liberate an issue with the new 11,1,102,55 Flash Player. It seems that when I arrived to http://www.adobe.com/software/flash/about/ it does not even load the flash movie.

    I'm on a Mac OS X 10.6.8 and I use chrome for most, but this problem also occurs in FireFox.

    Does anyone have ideas to wtf is happening?

    Thank you

    -Nate

    This is Firebug Firebug/Flash, the origin of the problem. I had to remove completely all firebug on the addons of firefox so that he stop throwing the error.

  • Error when closing: in the file 'TeamAdminTempDelete': delTempFile is not defined

    Hi all

    I have CS4 on my pc at work and now I need to set up some sites html for this site schuhe

    When Dreamweaver is closed, I still get the following error message:

    JavaScript error: in the "TeamAdminTempDelete" file: delTempFile is not defined

    I m getting this error for a few days. Several weeks before I it worked without this error.

    What can be the problem?

    Thank you.

    Solatt

    I forgot to tell some details to my CS4 version: here I have Dreamweaver 10.0 build 4117

    Found the fix to another user... You must delete the temporary file Dreamweaver creates.

    I have Windows 7 and it's my path to the file. You can do a search and find.

    C:\Users\Jim\AppData\Roaming\Adobe\Dreamweaver CS4\en_US\Configuration\WinFileCache-3012BA81.dat

    Delete - WinFileCache - 3012BA81.dat

  • When I launch Firefox, Iget the following message "TypeError: components.classes['@ [cid] is not defined.

    TypeError: Components.classes['@ [cid] is not defined. That's the message thast appears each time I start Firefox.

    This problem may be caused by an extension that is not working properly.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • XML Query when all the elements are not defined.

    I have the following:

    We could have a situation that elements of PRICES are not defined, but all others are. I can t solve this problem by performing a union query. Is there a way appropriate or better?

    Thank you

    DECLARE

    x_xml CLOB

    " : = ' < OTA_ResRetrieveRS xmlns =" http://www.OpenTravel.org/OTA/2003/05 "" xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance " Version = "7" "xsi: schemaLocation =" http://www.OpenTravel.org/OTA/2003/05 OTA_ResRetrieveRS.xsd "TimeStamp =" 2015-05 - 20 T 14: + 00:00 40:44.000000 "Target ="Test"TargetName ="AUS"TransactionIdentifier ="2716181"> " ""

    < success / >

    < errors >

    < error Type = '0' doc = "None" / >

    < / errors >

    < ReservationsList >

    < HotelReservation RoomStayReservation = "true" ResStatus = "Internal" >

    < Type UniqueID = "14" ID = "514803980" / >

    < services >

    < Service >

    < TPA_Extensions >

    < TPA_Extension >

    < WiFiFees NumberConnections = '2' = ConnectionType "F" LengthOfStay = "4" / > "

    <!-RATES DAYS = '7' UPGRADE = LEVEL-10 "20.65" = "21.95' LEVEL-20 ="39.95"/ >

    < RATES DAYS = UPGRADE '3' = '8.85"LEVEL-10 = '13.95' LEVEL-20 ="23.95"/ >

    < RATES DAYS = UPGRADE '1' = "2.95" LEVEL-10 = "5.95" LEVEL-20 = "9.95" /-->

    < / TPA_Extension >

    < / TPA_Extensions >

    < / service >

    < / services >

    < ResGuests >

    < ResGuest >

    profile of <>

    < ProfileInfo >

    < Type UniqueID = "21" ID = "356321732" / >

    < profile >

    < TPA_Extensions >

    < TPA_Extension >

    < DRI_INFO MemberLevel = GuestType 'SAM' = 'GST' OwnerStay = "N" / >

    < / TPA_Extension >

    < / TPA_Extensions >

    < customer >

    < PersonName >

    Tomas < name > < / name >

    Lane Donald < GivenName > < / GivenName >

    < / PersonName >

    < / customer >

    < / profile >

    < / ProfileInfo >

    < ProfileInfo >

    < Type UniqueID = "21" ID = "356321734" / >

    < profile >

    < TPA_Extensions >

    < TPA_Extension >

    < DRI_INFO MemberLevel = GuestType 'SAM' = 'GST' OwnerStay = "N" / >

    < / TPA_Extension >

    < / TPA_Extensions >

    < customer >

    < PersonName >

    James < name > < / name >

    Amanda < GivenName > < / GivenName >

    < / PersonName >

    < / customer >

    < / profile >

    < / ProfileInfo >

    < / profile >

    < / ResGuest >

    < / ResGuests >

    < RoomStays >

    < ideal >

    < BasicPropertyInfo HotelCode = "LOL" / >

    < price >

    < RoomRate RoomID = code '17105' = 'SAM' >

    < GuestCounts >

    < GuestCount Count = "1" / >

    < / GuestCounts >

    < / RoomRate >

    < / price >

    < TimeSpan Start = end of the '2015-05-20' = "2015-05-24" / >

    < / ideal >

    < / RoomStays >

    < / documents >

    < / ReservationsList >

    < / OTA_ResRetrieveRS > ';

    BEGIN

    I'm

    IN (SELECT x1.roomnumber

    x1.property

    x2.days

    x2.upgrad

    x2.lev1

    x2.lev2

    x3.folio

    x3.lastname

    x3.firstname

    x1.connections

    x1.connecttype

    FROM XMLTABLE)

    xmlnamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05"")

    , ' / OTA_ResRetrieveRS/ReservationsList/documents ".

    PASSAGE xmltype (x_xml)

    COLUMNS Numerobureau VARCHAR2 (2000) PATH 'RoomStays/RoomStay/RoomRates/RoomRate/@RoomID '.

    , property VARCHAR2 (2000) PATH 'RoomStays/RoomStay/BasicPropertyInfo/@HotelCode '.

    , rates XMLTYPE PATH "Services, Services, TPA_Extensions, TPA_Extension.

    , profiles XMLTYPE PATH "ResGuests/ResGuest/profiles/ProfileInfo.

    , connections VARCHAR2 (2000)

    Path "Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@NumberConnections".

    , connecttype VARCHAR2 (2000)

    Path "Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@ConnectionType") x 1

    , XMLTABLE (xmlnamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05'), ' / TPA_Extension/RATES " )

    PASSAGE x1.rates

    Days of COLUMNS VARCHAR2 (2000) PATH '@DAYS '.

    , upgrad VARCHAR2 (2000) PATH '@UPGRADE '.

    , lev1 VARCHAR2 (2000) PATH ' @LEVEL-10'.

    LEV2 VARCHAR2 (2000) PATH "(@LEVEL-20') x 2.

    XMLTABLE)

    xmlnamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05'), ' / ProfileInfo'

    PASSAGE x1.profiles

    Folio VARCHAR2 COLUMNS (2000) PATH 'UniqueID/@ID '.

    , name VARCHAR2 (2000) PATH ' profile/client/PersonName/family name.

    First name VARCHAR2 (2000) PATH 'Profile, customer, PersonName, GivenName') x 3

    the Union - is - it possible to get results without it?

    SELECT x1.roomnumber

    x1.property

    null

    null

    null

    null

    x3.folio

    x3.lastname

    x3.firstname

    x1.connections

    x1.connecttype

    FROM XMLTABLE)

    xmlnamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05"")

    , ' / OTA_ResRetrieveRS/ReservationsList/documents ".

    PASSAGE xmltype (x_xml)

    COLUMNS Numerobureau VARCHAR2 (2000) PATH 'RoomStays/RoomStay/RoomRates/RoomRate/@RoomID '.

    , property VARCHAR2 (2000) PATH 'RoomStays/RoomStay/BasicPropertyInfo/@HotelCode '.

    , rates XMLTYPE PATH "Services, Services, TPA_Extensions, TPA_Extension.

    , profiles XMLTYPE PATH "ResGuests/ResGuest/profiles/ProfileInfo.

    , connections VARCHAR2 (2000)

    Path "Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@NumberConnections".

    , connecttype VARCHAR2 (2000)

    Path "Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@ConnectionType") x 1

    XMLTABLE)

    xmlnamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05'), ' / ProfileInfo'

    PASSAGE x1.profiles

    Folio VARCHAR2 COLUMNS (2000) PATH 'UniqueID/@ID '.

    , name VARCHAR2 (2000) PATH ' profile/client/PersonName/family name.

    First name VARCHAR2 (2000) PATH 'Profile, customer, PersonName, GivenName') x 3

    ORDER BY 8)

    LOOP

    Dbms_output.put_line (i.roomnumber

    || ' '

    || students

    || ' '

    || i.Days

    || ' '

    || i.upgrad

    || ' '

    || i.Lev1

    || ' '

    || i.Lev2

    || ' '

    || i.Folio

    || ' '

    || i.LastName

    || ' '

    || i.FirstName

    || ' '

    || i.Connections

    || ' '

    || i.CONNECTType);

    END LOOP;

    END;

    I can t solve this problem by performing a union query. Is there a way appropriate or better?

    Yes, you can use an OUTER JOIN:

    SELECT x1.roomnumber

    x1.property

    x2.days

    x2.upgrad

    x2.lev1

    x2.lev2

    x3.folio

    x3.lastname

    x3.firstname

    x1.connections

    x1.connecttype

    FROM XMLTABLE)

    XmlNamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05')

    , ' / OTA_ResRetrieveRS/ReservationsList/documents ".

    PASSAGE xmltype (x_xml)

    COLUMNS Numerobureau PATH VARCHAR2 (2000) 'RoomStays/RoomStay/RoomRates/RoomRate/@RoomID '.

    , the path of the VARCHAR2 (2000) 'RoomStays/RoomStay/BasicPropertyInfo/@HotelCode '.

    , rates XMLTYPE PATH "Services, Services, TPA_Extensions, TPA_Extension.

    , profiles XMLTYPE PATH "ResGuests/ResGuest/profiles/ProfileInfo.

    , connections VARCHAR2 (2000) path 'Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@NumberConnections '.

    , connecttype PATH VARCHAR2 (2000) 'Services/Service/TPA_Extensions/TPA_Extension/WiFiFees/@ConnectionType '.

    ) x 1

    XMLTABLE)

    XmlNamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05')

    , ' / TPA_Extension/PRICE.

    PASSAGE x1.rates

    Days of COLUMNS VARCHAR2 (2000) '@DAYS '.

    , upgrad VARCHAR2 (2000) path '@UPGRADE '.

    , lev1 PATH VARCHAR2 (2000) ' @LEVEL-10'.

    , lev2 PATH of VARCHAR2 (2000) ' @LEVEL-20'.

    ) (+) x 2

    XMLTABLE)

    XmlNamespaces (DEFAULT 'http://www.opentravel.org/OTA/2003/05'), ' / ProfileInfo'

    PASSAGE x1.profiles

    Folio VARCHAR2 COLUMNS (2000) path 'UniqueID/@ID '.

    , name VARCHAR2 (2000) PATH ' profile/client/PersonName/family name.

    , name VARCHAR2 (2000) PATH "profile, customer, PersonName, GivenName".

    ) x 3

  • output with the menu command leave I get ReferenceError: b is not defined

    When you quit Firefox using file / exit option in the menu, in this version and the previous version, I received the error message "ReferenceError: b is not defined.
    It does not Firefox to start normally the next time but I feel boring.

    Thank you

    I suspect an add-on is causing this error. Try the procedures in article Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems .

  • What does it mean when I connect to Facebook and a pop-up out saying ' [JavaScript Application] error: jQuery ("#fb_menu_account", document) .attr ("href") is not defined?

    What does it mean when I connect to Facebook and a pop-up out saying ' [JavaScript Application] error: jQuery ("#fb_menu_account", document) .attr ("href") is not defined? I would like to know what I can do to solve this problem. The site will end up running slow. I tried to clear cookies and cache, but it does not work.

    URL of affected sites

    http://www.Facebook.com

    Fact is always happen in Mode without failure of Firefox. See questions to troubleshoot Firefox in Safe Mode.
    If so, it is probably caused by an add-on.

Maybe you are looking for

  • Re: Satellite M300 - can I restore Vista from Windows 7?

    Hi, my laptop model is Satellite M300 I want to ask all can I have used the recovery disks that I created last time when I was with Windows Vista Home Premium, to restore it back to Vista after I format my C drive and install the new OS which is Wind

  • Update to iOS 9.2.1

    CCan I update my iPad iOS iOS 9.1.2 7.2 Air.

  • Update BIOS version 1.55 for the hard-to-find S540!

    I discovered by chance that today there is an update of the BIOS for the Thinkpad S540 at the link: http://support.Lenovo.com/en_GB/downloads/detail.page?&docid=DS038373 This is the version 1.55, released on 12 May. .. .and even if I go to drivers in

  • Best laptop

    Hi, I'm going to United in September and I am looking for a laptop. I was wondering if anyone knew the best laptop to buy. What are best to work on many different programming languages.

  • Problem with Outlook Express "Message has not been downloaded."

    I'm having a problem with emails and attachments removed once I open and view them.  More specifically, when I opened an e-mail message by using Microsoft Outlook Express 6 with an attachment, I am able to see the file and open the attachment.  Howev