Format model oddity; G and V combined

Hi,
can I have your opinion on this..
Some background if you're not familiar with the 'V' in format models:
select to_char(100, '999999999V9') newnum from dual;  --- 100 * 10^1 =   1 000
select to_char(100, '99999999V99') newnum from dual;  --- 100 * 10^2 =  10 000
select to_char(100, '9999999V999') newnum from dual;  --- 100 * 10^3 = 100 000In short; it multiplies with 10 ^ (number of 9's after the V) , and rounds as needed. Simple, and sometimes useful.
Now, I found that I could format the result with group separator in one go, so I had this
select to_char(1000000, '999G999G999') newnum from dual;  --- 1 mill -> 1,000,000reduced to 100K , and added a V9 to the end of the format model:
select to_char(100000, '999G999G999V9') newnum from dual;  --- 1 mill -> 1,000,000 ??but I got this:
100,0000
1 row selected.
Now, wouldn't you agree it's a bit weird? I would have expected the V to operate before the G's , to return 1,000,000 .
How about you? There are others that could be useful which doesn't work, for example
select to_char( 1000, '999G999.99V9') newnum from dual;
ORA-01481: invalid number format modelwhen I'd like to see '10 000.00'. Feels a little buggy that it works at all, the above?
I have
select * from nls_database_parameters;
PARAMETER                      VALUE                                  
NLS_LANGUAGE                   AMERICAN                               
NLS_TERRITORY                  AMERICA                                
NLS_CURRENCY                   $                                      
NLS_ISO_CURRENCY               AMERICA                                
NLS_NUMERIC_CHARACTERS         .,                                     
NLS_CHARACTERSET               WE8MSWIN1252                           
NLS_CALENDAR                   GREGORIAN                              
NLS_DATE_FORMAT                DD-MON-RR                              
NLS_DATE_LANGUAGE              AMERICAN                               
NLS_SORT                       BINARY                                 
NLS_TIME_FORMAT                HH.MI.SSXFF AM                         
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM               
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR                     
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR           
NLS_DUAL_CURRENCY              $                                      
NLS_COMP                       BINARY                                 
NLS_LENGTH_SEMANTICS           BYTE                                   
NLS_NCHAR_CONV_EXCP            FALSE                                  
NLS_NCHAR_CHARACTERSET         AL16UTF16                              
NLS_RDBMS_VERSION              11.2.0.1.0                             
20 rows selected.Well, just thought I'd mention it :)
Rgds, A

Hi,
Arild wrote:
... Some background if you're not familiar with the 'V' in format models:Thanks; I'm not familiar with it. I've never seen it used, let alone used it myself.
Do you actually use it in production code?
... Now, wouldn't you agree it's a bit weird? I would have expected the V to operate before the G's , to return 1,000,000 .
How about you? There are others that could be useful which doesn't work, for example
>
select to_char( 1000, '999G999.99V9') newnum from dual;
ORA-01481: invalid number format model
I'd be interested in learning why Oracle included this. I suspect some important customer asked for it long ago, and Oracle has continued to support it, but not very much. (That is, they haven't tried to make it a little more useful, by letting it do things like your examples.) They haven't documented it very well, either. For example, the SQL language manual
http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements004.htm#sthref379
says very clearly that 'TM' format can't be combined with certain other elements, but, just a few lines later, says nothing about combining 'V' with other elements.
It's not that hard to say
select  to_char (1000 * 10, '999G999.99')    AS newnum
from    dual; it that's what you really need to do. Can you think of any examples where a work-around would be very inconvenient?

Similar Messages

  • How to use AND and OR Combinations for a Rule in Rule Modeler of ERMS

    Hi Experts,
    When we are defining rules in the Rule Policy, we need to create a condition which uses a combinations of AND and OR.
    But the standard Rule Modeler of ERMS is allowing us to create conditions either using all AND or with all OR options.
    Is there anyway that we can define rules in the Rule Modeler using both AND and OR combinations at the same time.
    Regards,
    NIloufer

    A variant is a very specific LabVIEW datatype (really a C++ type object internally) and trying to pass that to a function, which excepts a flat memory pointer there, for sure will crash very quickly.
    As to endianess, yes Unflatten will be able to adjust for endianess, which in this case however is most likely exectly NOT what you want. So make sure that the you select native type for the endianess input on Unflatten from String. LabVIEW internally works with whatever is the native endianess, as will most likely your C++ DLL. The platform independent big endian format does only come into play when you receive data streams over some streaming interface like a network connection. Here it is desirable to use an endian format that is independent from the actual platform that generates and consumes the data stream. LabVIEWs default endianes is big endian here.
    But as long as you pass data directly to native components like DLLs there is no difference in endianess between what LabVIEW uses and what those components use.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Call to_char, to_number or to_date with nls_pars but without a format model

    Hi
         Does somebody know if there is a way to call to_char, to_number or to_date functions defining nlsparam argument and without defining the format model arument, in order to use implicit conversions.
    Thanks
    Bye Alessandro

    In my environment there is a table where I store old values (each field as varchar2) of updated and deleted table records with a sort of audit_triggers.
    These triggers are the ones using to_char(<number>) to convert a number. It works fine because it does what I need. If i specify a format model ( the same for all the conversion ) I have some problems. Some of them are the following, there are more.
    - with decimals for the format model on an integer I'll have a conversion like "1.00000000000" on the table storing old values and I had indications to avoid this behavior.
    - if I don't specify enough 9s for the integer part the number will be converted to a string like "################".
    Now I found that some users work with a different nls_numeric_characters session parameter and this introduced problems for reading those numbers because 1.500 can be one dot five or fifteen hundreds.
    A format model that does the same as implicit conversion would work as well but I didn't find it yet.
    Thanks Alessandro
    Message was edited by:
    Alessandro Rossi
    My need then is to call to_char() with nls_pars but without a format model
    A sample of why I want the implicit conversion
    select to_char(1989793456895722342342334534534564356435902636)
    from dual
    select to_char(198979345689572234234233453453456435253453154153456435902643536,'999999999999999999999999999999999999999999999999999999')
    from dual
    /

  • I can't find this format model in the documentation

    it's my default oracle date format, but with some little addon.
    the text reads
    2003-09-30 00:00:00.0
    it's not
    yyyy-mm-dd hh24:mi:ss
    because of that little .0 at the end. I can't modify the data coming in, does anyone know how to represent the milliseconds(I'm guessing?) in the format model
    thanks

    That would depend on the version of Oracle you are using.
    Starting with Oracle 9i :
    TIMESTAMP Datatype
    The TIMESTAMP datatype is an extension of the DATE datatype. It stores the year, month, and day of the DATE datatype, plus hour, minute, and second values.
    Specify the TIMESTAMP datatype as follows:
    TIMESTAMP (fractional_seconds_precision)
    where fractional_seconds_precision optionally specifies the number of digits in the fractional part of the SECOND datetime field and can be a number in the range 0 to 9. The default is 6. For example, you specify TIMESTAMP as a literal as follows:
    TIMESTAMP '1997-01-31 09:26:50.124'

  • ASO Time and Periods combined - Dynamic Time Series?

    I am looking to do period-to-date calculations in ASO using the method outlined by Gary Crisci but I have Time and Periods combined into one heirarchy.
    I have seen suggestions that this can be done, but I cannot find any example code for the calculations.
    My MDX skills are not up to the challange yet so I was hoping someone is doing this and could shed some light.
    I am exploring the options of hard-coded alternate heirarchies, but data is stored at the day level and users want
    the same capability they have in BSO.
    Thanks,
    Kenneth

    You can create the calculated members within the existing time dimension, but it get ugly and probably won't perform great. For starters you will have to create a calculated member with a formula for every stored time member you have. Not too bad for 12 months, but if you ahve years and months in same dim or daily model, its not realistic. That is the beauty of View dimension, a single formula goes a long way.
    Other option is to not have alternate roll-ups in time dim - perhaps you can use Attribute dims to simulate the alternate groupings you need.

  • I am trying to use an external 3g modem made by Huawei model e173s-6 and when I do connect it on my usb port the macbook pro just do not recognize it. I own a 2012 model with mountain lion 10.8.2 . What should I do ?

    I am trying to use an external 3g modem made by Huawei model e173s-6 and when I do connect it on my usb port the macbook pro just do not recognize it. I own a 2012 model with mountain lion 10.8.2 . What should I do ?

    I still don't know what happened to my test Aperture Library after the update to 3.4...Not only were my previews lost, but so were the original images!  Needless to say, I haven't bothered to update the main library on the Mac Pro because I don't want to deal with this level of uncertainty (even with backups in place).

  • In my macbook pro 15 inch mid 2012 model, my cpu and gpu will get very hot, when gaming or rendering sometimes over 200F. The fans only spin at max about 2900 rpm, when their max is 6400. I downloaded a fan control app, but how can i fix it?

    In my macbook pro 15 inch mid 2012 model, my cpu and gpu will get very hot, when gaming or rendering sometimes over 200F. The fans only spin at max about 2900 rpm, when their max is 6400. I downloaded a fan control app, but how can i fix it?

    Hi rhaughan,
    I see that you have concerns about your operating temperature of your computer while using resource-heavy applications such as gaming applications. I have an article that will address some of the concerns you have mentioned:
    Mac notebooks: Operating temperature - Apple Support
    http://support.apple.com/en-is/HT201640
    While there are third-party utilities that measure the temperature of a notebook computer, it is important to understand that these utilities are not measuring the external case temperature. The actual case temperature is much lower. Never use third-party applications to diagnose possible hardware issues—instead, contact Apple or go to an Apple Retail Store or Apple Authorized Service Provider.
    You should also see this article for even further information about your fans:
    Learn about the fans in your Mac - Apple Support
    http://support.apple.com/en-is/HT202179
    Thanks for being a part of the Apple Support Communities!
    Cheers,
    Braden

  • How to format my macbook pro and I dont have my lion cd or usb stick?

    How to format my macbook pro and I dont have my lion cd or usb stick?

    try this
    http://support.apple.com/kb/HT3294http://support.apple.com/kb/HT3294
    http://support.apple.com/kb/TS4265http://support.apple.com/kb/TS4265
    If you don't have the original PSWD, your beat, so tough if your a kid trying to be a kid

  • I just bought a panasonic  50" plasma tv model TC-P50X3 and i want to connect my macbook pro with my new ty how do i do that?

    i just bought a panasonic  50" plasma tv model TC-P50X3 and i want to connect my macbook pro with my new ty how do i do that?

    Assuming your MBP is a recent model, i.e. bought in the last couple of years, and that your TV has HDMI inputs (if you've bought it new then that's a safe assumption) then you need a mini-displayport to HDMI cable.  The Apple Store sell one:
    http://store.apple.com/uk/product/H7128ZM/A/mini-displayport-to-hdmi-cable-2m?fn ode=MTY1NDA3Ng&s=topSellers

  • I have an external hard drive that was formatted by a PC and has files and directories etc. I want to format it and use it on my IMAC for backup but I can't seem to write to it nor can I delete current content. How do I initialize it for use with the MAC?

    I have an external hard drive that was formatted by a PC and has files and directories copied to it etc. I want to use it on my IMAC for backup. I see it on my my IMAC . I can open files etc.  But I can't seem to write to it nor can I delete current content. I don't care if I lose current content. How do I initialize it for use with the MAC?

    You can't write to it because it's formatted as NTFS which OS X will read but not write to. If you want to continue using the drive with both a PC and OS X you will need to download and install NTFS-3G so you can then write to it from your Mac. You can get NTFS-3G at:
    http://www.macupdate.com/app/mac/24481/ntfs-3g
    If you want to use the drive exclusively with your Mac then move the data off it and reformat it in Disk Utility (Applications - Utilities - Disk Utilities) as Mac OS Extended (Journaled.)

  • I have a sony handy cam model HDR-HC1 and a mac pro running osx10.9.3, are they compatible? as far as downloading movies from my handy cam. thanks in advance

    i have a sony handy cam model HDR-HC1 and a mac pro running osx10.9.3, are they compatible? as far as downloading movies from my handy cam. thanks in advance. If not, is there a different route i can take to get those recordings in to my mac pro?

    See if the cam shows up under Devices in the Image Capture app.
    Image Capture is located in your Applications folder.
    Launch Image Capture then connect the camera.
    The camera should show up under Devices top left side of the Image Capture window.
    Now look at the bottom left side of the window. Click the: Connecting this (device) opens: pop up menu and select an application to import your photos.
    You can also select a folder to import photos from the Import To: pop up menu.
    Selet the photos you want to import then click Import or Import All on the right.

  • User Exit to check whether chapter id for Material and Plant combination is maintained while creating sales order

    Hello all,
    my requirement is, system should give error message while creating sales order, if chapter ID is not maintained for a material and plant combination.
    please suggest the user exit.

    Hi
    CASE 1 : All Plants are excisable.
    In Material master , Foreign Trade data tab-  mentioned Control code field mandatory. ( i.e nothing but Chapter ID)
    CASE 2 : Few Plants are excisable
    In the Case 2 you need to go for Enhancement
    Program Name : MV45AFZB 
    User Exit:            USEREXIT_CHECK_VBAP ( Item Level Check )
    By using above user exit you write a logic with the help of ABAPer
    Plant and Chapter ID combination table : J_1IMTCHID

  • My camera Canon G3 (i know it's old) no longer connects to iPhoto (8.1.2) on my iMac, I have checked with my friends iMac same model iPhoto version and it works fine using my cable, I would appreciate any help getting this sorted

    My camera Canon G3 (i know it's old) no longer connects to iPhoto (8.1.2) on my iMac, I have checked with my friends iMac same model iPhoto version and it works fine using my cable, I would appreciate any help getting this sorted

    As a Test:
    Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?

  • Front end Backend Modeling Configuration Reporting and Extraction.

    Hi..All
    Can Any one plz explain the terms "Front end","Back end" related to Modeling,Configuration,Reporting and Extraction.
    Thanks & Regards
    Jonn
    <u>[email protected]</u>

    Hi,
    Frontend is the reporting aspect, i.e Workbooks, queries, Web reporting, Crystal reports, etc.
    Its called the frontend as that's what the users see and they don't see what goes on in the 'backend' i.e Config and Extraction, data manipulations, etc.
    Modeling is used to design the cube, ODS, etc. Also modeling concepts can be used to design frontend queries as well.
    Cheers,
    Kedar

  • I format my hard drive and now dont have a sync key to access to my account, please help me!

    Please Help me! My computer was infected by a virus, and I format my hard drive and reinstall the OS. Now I installed Firefox 4 beta 10 but don't have access to my sync account because i don't the "Sync Key" and don't use Firefox in other devices... please please help me to access to my account I need recover my bookmarks and configuration, Thanks.

    Sorry, without your Sync Key you're out of luck. It is used as the decryption key for the data that is stored on the Sync server.

Maybe you are looking for