Formating in select

Hi,
Is there anyway I can do the following in select statement.
I select a column from a table say the value being 12.555.
select percentage from tablea.
I want to show it as 12.55500%. is this possible.
If its 12.55 it should show as 12.55000%.
Thanks,
Indu

SQL> select * from t;
         X
    12.555
SQL> select  to_char(x,'99D99999') || '%' from t;
TO_CHAR(X,
12.55500%All number format models can be found here http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements004.htm#i34570
Edited by: P. Forstmann on 20 janv. 2010 15:00

Similar Messages

  • Oracle 10g - Date format in SELECT query for CFOUTPUT

    Hello, everyone.
    The project that I am working on in the dev environment is connected to an Oracle 11g database, but the production side is Oracle 10g.
    I have a page that is erroring in production (but not development) when it gets to a date that it needs to display.
    A co-worker mentioned that, in 10g, if a date/time is being SELECTed, you have to put it in to_char(), so I did that.
    But it's still erroring, and I'm not getting an error message, so I'm assuming that I have an incorrect format for the date in the SELECT.
    What is the proper format for SELECTing a date/time when using to_char()?  Right now, I have SELECT to_char(create_date,'MM-DD-YYYY HH:MI') FROM tableA .  Is this not correct for CF to output?
    Thank you,
    ^_^

    Please see my original post ("I have a page erroring in production (but not in development) when it gets to a date that it needs to display.")  Sorry if it came across as vague.  It made sense, to me, when I typed it.  But, then, I'm usually typing fast just to get the question out there, when I'm in a hurry.
    Haven't done a CFDUMP, yet, as every time I make a change in development that needs to be tested in production, I have to notify my supervisor that there are files that need to be copied into production, which can sometimes take a while, so I try to do troubleshooting on dev side - it's a pain in the you-know-what, but that's the kind of environment I'm working in.
    As it turns out, changing the format in the SELECT to_char() did the trick.  If anyone else has this issue with Oracle 10g, I'm now using SELECT to_char(create_date,'YYYY/MM/DD HH:MI') FROM tableA, and now the CFOUTPUT is processing the whole page.  I guess the MM-DD-YYYY threw CF into a tizzy, breaking the process?
    Anyhoo, it's working, now.  Thank you, Dan and Adam, for your thoughts on this.
    ^_^

  • How to change date format in select-option (mm.yyyy).

    Hi,
       Plz, How to change date format in select-option (mm.yyyy).
      in my selection screen date type selection-option is there ,when i am enter date   it's  taken  dd.mm.yyyy format,but i want mm.yyyy format.
    how to set that .
    Regards,
    Kk.

    sorry
    parameters : pmonyr type spmon or
    select-options : sspmon for PGPL-spmon .
    or what table ccontains spmon.
    regards
    shiba dutta

  • Acrobat 9 - table/formatted text select tool

    In acrobat 5 exist "table/formatted text select tool". That function exist in acrobat 9? Where?
    thanks

    Hi,
    as its a long time ago since the thread was wrote, but sometimes anybody is looking it could help .
    Select the text of yout table with the normal text selecting tool and open the context menu with your right mousebutton. There you can save the table with "Save as table".
    Best regards

  • Format of select-option

    Hi all,
    is it possible to use a select-option in the "using" part of an form routine?
    I would like to create a form routine where I can format the select-option into a string to write the result on screen.
    I have multiple select-options but want to create a single form routine to handle them all.
    For instance, when I write a Debitor select option it looks like:
    Debitor IBT00000000010000000004
    But I want to show it like this (after calling a form routine which uses a select-option and returns a string):
    Debitor between 1 and 4.
    When I want to reach the sign part of the select-option in the form routine
    I get an DataObject has no structure and therefore got no "sign" component error message.
    Can you folks help me with this?
    Thanks in advance!
    Greetings Fred.

    Hi Fred!
    Your problem is the <i>generic</i> interface, I see.
    You have to work with the length of the field. I once had a FM for this, but I didn't copy the coding :-(.
    Here the logic:
    describe the field length.
    The first is including / excluding.
    The 2nd and 3rd is between / equal...
    The rest 'field3((length-3)/2)' and field3+(length-3)/2((length-3)/2) are your fields.
    E.g. length 15, so it's field3(6) and field9(6).
    Use conversion_exit_alpha_output for display explicit, convert date, time and quantities explicit, too.
    Hope you got the picture,
    Christian

  • Which format to select for burning DVD?

    Hi to all. I have been trying to burn a few of my projects, 3 to be precise, onto a DVD. Tried out Finder>Burn folder, but found out that the finished DVD would play only on computers; as I need to have one that can be viewed on normal DVD players I tried to do so in Toast Titanium in which I was faced with the problem of which of these above formats to select:
    Can anyone help me?
    Further, after [I think] I selected MPEG-4 player and then faced this hurdle...a notification to this effect that I was making a DVD of PAL and [?] NTSC videos which may not play in all players. Not knowing what to do I just clicked OK and found out that I was able to view it on my small [low cost as well] DVD player.

    I have Toast 10 and I don't see your drop down menu you see.
    1. Select DVD Video icon from the bar of icons on the top left (it's the third one).
    2. Drag your video file to the window on the right, or click the Add button on the bottom of that window.
    3. Select menu and auto play options on bottom lelft pane.
    4. Click the big red button.

  • How to format the "Selected" portion of a button

    I created a simple menu screen with 4 chapter buttons (a jpeg for each chapter) and I'm trying to format each one so that it is highlighted when selected. Problem is, the highlighted area is significantly larger than the jpeg it is supposed to cover and actually bleeds onto its neighboring buttons. When I try to size it down, the jpeg shrinks along with it! Also, there's a strange little line that appears at the bottom of each jpeg when selected (it looks like a thin button, but there is no way to delete it or format it either).
    I tried going through the DVDSP manual & index but nothing seems applicable.
    Is there a way to format the "highlight" on the menu button/jpeg so that it only covers the jpeg?
    Thanks for any assistance!

    The button areas will always be rectangular so there is a chance of overlap. One of the ways for the most control is to use an overlay and keep in mind how close the buttons will be so they do not overlap. For instance the highligh can be an arrow, or an arrow and text.
    http://dvdstepbystep.com/newmap.php

  • Problem with date format in select query

    Hi
    I am caught by a stupid problem, please help me
    I am writing a queries
    SELECT * FROM VOUCHERS WHERE VDATE = '07-AUG-08'
    SELECT * FROM VOUCHERS WHERE VDATE = '07-AUG-2008'.
    both are working fine in SQL Developer but returning error when called from JDBC Driver.
    First query doesn't return any record while it is supposed to
    Second returns error: ORA-01858: a non-numeric character was found where a numeric was expected
    What i remember, at least second query was working previously but what happend, i dont know
    i didn't change Oracle default datetime format or any other defaults
    Message was edited by:
    W-S

    It is a common issue most people don't realize what Oracle does with a query like this. You're comparing strings to dates. Use TO_DATE to convert your string '07-AUG-08' to a date. If you don't, you tell Oracle to convert the string to a date by itself. It may work sometimes but like you've experienced, it is not a very robust or elegant approach.
    Try something like this:
    SELECT *
    FROM vouchers
    WHERE VDATE = TO_DATE('07-AUG-2008','DD-MON-YYYY').You can even provide a third parameter to TO_DATE, but it's less frequently used. I let you figure it out.
    And a tip: the "urgent" keyword might act against you.

  • Allowing a User to choose the ALV layout format on selection-screen

    Hi all,
    I would like to know how i can add a parameter to my selection-screen which would allow the User to choose a saved ALV layout format before pressing F8 rather than after. As used in CO15 or MB51.
    Thanks  femi.

    yes , You can check the program BCALV_TEST_FULLSCREEN_LAYOUT  to check how F4 help is to be used .
    to check existene of variant is pretty simple.
    Pass the variant name in the ALV display FM .

  • How to insert sysdate in 24hr format using select

    hi,
    I m just modifying my previous question
    what if I have to insert the date using
    insert into abc select sysdate from dual;
    where abc is having one column sdate of type date.
    this date inserted through the query to be inserted in 24hr
    format.

    a date is just a number, it doesn't have a format. so your
    insert string will work. to see the time element in 24 hour
    clock all you have to do is
    select to_char (col1, 'DD-MON-YYYY HH24:MI:SS') from abc;
    easy.
    APC

  • Forcsing number formatting in Select statement

    Hi. I have a select statement that truncates a number field and compares it to a parameter, but it doesn't work in InfoView or as a scheduled report in Crystal Server.
    The string is :
    left(totext({gl_begbal.prd-yr-no}),4) startswith totext(year({?Pm-?Period Ending Date}))
    The number field is yyyymm, but Crystal Reports displays the field as 201,006, which causes the select statement to fail. When I  set Options, Fields, Number to whole number, CR displays it without the comma and the statement works perfectly. However, when I bring the report into CServer or fun it in InfoView, the report fails again, and I can't find any formatting options in either Server or InfoView settings.
    Is there a way to forcse the format to whole number within the select formulae?
    Thanks!
    Robin

    Post your question to the BOE Admin forum. Likely what is happening is the BOE server has a different default date format.

  • Formating page select in a Pivot Table

    We have a Pivot Table view that has 12 columns, so it is a bit large (more or less like 2 screens wide).
    The Page select is displayed in the middle of screen so the user doesn´t see it right away... he has to roll the screen and then see/select it...
    Pls...is there a way to format the Page select in the Pivot table to the left ?
    txs.
    Antonio

    Hi,
    A pivot table view of this data would look something like this by default:
    Now switch back to the criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    *#,##0;-#,##0;0* 
    If you want a dash/strike (-) then you could enter:
    #,##0;-#,##0;-
    Or if you want to add a custom message then something like this would work:
    #,##0;-#,##0;no data
    http://obieeelegant.blogspot.com/2011/06/how-to-replace-null-values-in-obiee.html
    if it's not working above method use BIN in report
    thanks
    Deva

  • IMac OS 8.5 Boot Issues - Install/Format HD/Select Startup Disc?

    Hello,
    I have a used iMac that had OS 8.5 installed. When I first booted, it appeared there was no OS installed (flashing icon - folder with "?" and Folder with OS icon). Attempted to install OS 8.5, but get the same error after reboot.
    Tried to use 'Initialize Disk' to reformat the hard drive, then installed OS 8.5. Same error on reboot. Have tried using the Startup Disk (?) option to select the hard drive, but there appears to be no option save to click.
    I don't know about Mac and Master Boot Records or if there is a Mac CMOS. Any ideas on what I am doing wrong?
    Thanks,
    Dave
    iMac G3   Mac OS 8.6 or Earlier  

    Just might be a hardware issue. Here is what I tried this morning:
    Reblessed system, booting from install CD.
    System Error on reboot - address
    * Occasionally on this error, the system will not reboot then the "reboot" button is pressed. Power button non-responsive. Have to shut down the old fashioned way - yank the power cord.
    Startup from Install CD with no extentions.
    Initiated HD, 1 partition, Mac Standard.
    Rebooted system.
    Began Installation with "recommended installation" for all items.
    Reboot - same flashing icon.
    Boot from install CD, address error.
    Reboot with no extentions.
    Erased HD (Selected HD Icon | Special -> Erase Disc)
    Reboot with install CD
    Ran Disk First Aid on HD - checked out fine.
    Initialized with 2 partitions:
    - 3GB MacOS Standard
    - 3GB MacOS Extended
    Ran disk First Aid - no problems.
    * On a lark, I ran Disk First Aid on the Install CD and got the following:
    Problem: Custom icon is missing,452,328
    Problem: Custom icon is missing,453,327
    Volume iMac Install needs to be repaired.
    Began Installation again anyway...
    Selected Clean Install from Select Destinations | Options
    Recommended install.
    Reboot. Address error. Same problem...
    iMac G3 Mac OS 8.6 or Earlier
    iMac G3 Mac OS 8.6 or Earlier

  • Formatting a SELECT

    I would like to do this:
    SET ECHO OFF
    SET FEEDBACK OFF
    SET HEADING OFF
    SET TERM OFF
    SET PAGESIZE 0
    SET LINESIZE 1000
    SET TRIMSPOOL ON
    SPOOL SELECT.LIST
    SELECT FIELD1, FIELD2, FIELD3 FROM TABLE;
    SPOOL OFF;
    EXIT;
    But I need fields separated by a tab...
    Is there a sqlplus command to get this?
    The next is not a good solution...
    SELECT FIELD1||chr(9)||FIELD2||chr(9)||field3 from table;
    :-)

    Sorry, bluefrog..
    It doesn't work properly...
    SET ECHO OFF
    SET FEEDBACK OFF
    SET HEADING OFF
    SET TERM OFF
    SET PAGESIZE 0
    SET LINESIZE 1000
    SET TRIMSPOOL ON
    SET TAB ON;
    SPOOL c:\SELECT.LIST;
    SELECT 1,2,3,4,5 FROM DUAL;
    SPOOL OFF;
    The result file is...
    1 2 3 4 5
    (several spaces between fields)

  • BOXI3.0 How to choose certain data format from selected field?

    Hello there!
    Its been a while since my last post the question.
    I have one question.
    I have this PO_ID field. Example of the data:
    1. 72998
    2. FF15376
    3. 71794R
    4. WSSC 092008/0004
    5. WC/ 092008/0290
    6. MP20080911-1187
    There are a lot of style or non fix data format inside PO_ID field.
    My question is how can I choose only PO_ID type no.1 (72998) only show in the webi?
    Filtering is one way but what about formula or variable or any other method?
    Hope the expert can help me.
    Thank you very much.
    Best regards,
    Alias

    Alias,
    If there is any other simple solution, do inform
    Of course there is more than one way to skin a cat.  Here are a couple of ways:
    =if(substr[Po_ID];1;1) inlist ("0";"1";"2";"3";"4";"5";"6";"7";"8";"9");"Number";"Not a number")
    =if(substr[PO_ID];1;1)>="0" and substr([Po_ID];1;1)<="9";"Number";"Not a number")
    Personally I have more confidence in the first example, but the second example may work reliably.  It's just that I've used the first method more often...
    Thanks,
    John

Maybe you are looking for

  • Archive link disappear!!!

    Hi, I've done a Blog and ready to publish.But finally found that the Archive link/Button disappear!! What'ld i do to make it appear again?! Thanks and Appreciate!

  • Opening Captivate 3 file

    Greetings everyone: I'm a new Captivate user (elearning developer) and I'm having a problem with others (my boss) being able to open my Captivate projects that I send to them for review. I've tried publishing as flash and standalone, and it seems Win

  • Suitcase Fusion 3 for fonts slowing down Illustrator?

    I'm working on a PC in windows 7 and using CS5. I have Extensis Suitcase Fusion 3 for font management but someone told me that this may be why my Illustrator in particular is so slow. I frequently have to sit and wait for it to catch up to me while t

  • Adobe CS6 Design and Web Premium

    I downloaded Adobe CS6 Design and Web Premium which took all day. I was trying to install it and it stopped. Do I have to redownload this again? or can I find it on my computer?

  • MacBook hard disk upgrade - any concern?

    After installing Leopard, I found that my 2GHz Core Duo MacBook original 80G hard disk is really not enough for the OS plus my usual apps (Final Cut Studio, Photoshop, iWork, iPhoto), they took up more than half of my HD space. So I decided to get a