How to get the output in the required format

Hi,
I have a table Months
it has 2 columns month_id (number) and month_name(varchar2).
I wish to get the o/p from a select query such that ,
when user chooses a specific month_id it should appear first and rest all months should come below it in ascending order.
example - if the month_id choosen is 3
then the output should be like
Month_id Month
3 March
1 January
2 February
4 April
5 May
How to do this ?
Thanks.

Here is one way ->
satyaki>
satyaki>with date_tab
  2  as
  3    (
  4       select rownum month_id
  5       from dual
  6       connect by rownum < 13
  7    )
  8  select month_id,
  9         to_char(add_months(trunc(sysdate,'YEAR'), month_id - 1),'Month') Month
10  from date_tab;
                                          MONTH_ID MONTH
                                                 1 January
                                                 2 February
                                                 3 March
                                                 4 April
                                                 5 May
                                                 6 June
                                                 7 July
                                                 8 August
                                                 9 September
                                                10 October
                                                11 November
                                          MONTH_ID MONTH
                                                12 December
12 rows selected.
Elapsed: 00:00:00.00
satyaki>Regards.
Satyaki De.

Similar Messages

  • How to get the output of the report in pdf format

    how to get the output of the report in pdf format?
    Thanks in advance,
    madan.

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF

  • My UR12 Steinberg interface is recognized by Yosemite but I can't get any output from the device, does anyone know how to fix this problem? Thanks in advance

    My UR12 Steinberg interface is recognized by Yosemite but I can't get any output from the device, does anyone know how to fix this problem? Thanks in advance

    Apparently it's related to the Firefox plug in.
    This isn't exactly a solution but more of a way to avoid opening PDFs with Firefox's plug in.
    1. Highlight "Tools" from the Menu Bar in the top left of the screen (or click "Options" if using the Firefox Compact Menu)
    2. Select to "Options
    3. Select "Applications"
    4. Look for "Adobe Acrobat Document" under Content Type and to the right under Action select "Use Adobe Reader (default)" instead of the using Adobe Acrobat in Firefox
    5. Open a test PDF. It should open in it's own window now.
    Again, not a complete solution but something that'll at least let you scroll with PDFs open.
    More info here: http://forums.mozillazine.org/viewtopic.php?f=38&t=2171033

  • How to get the output of the Send Separate Remittance Advices in XML in R12

    Hi All,
    I have a requirement where we want the output of the standard report 'Send Separate Remittance Advices' to come in XML, currently its coming in PDF format.
    Can you please help?
    Thanks,
    Dilip
    Edited by: 990784 on Mar 12, 2013 2:57 PM

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF

  • How to get date appended in the filename of the IR reports

    I have a requirement where in i need to generate the output for the IR reports with a date appended in the output name.
    The report is scheduled daily. The generated output should have a date appended to it.
    For example - if the report say 'abc' gets generated today then the name of the generated report should be abc_26/10/2009.
    I could find one option saying append date to the filename while adding a schedule to the report. I have checked that property but still while generating the report i am not able to see the date appended with the report name. It just takes the cycle name that i had mentioned.
    I am using IR 11.1.
    Any help is appreciated.

    Do to the complexity of the program we need to run it with sequences.  This is because we need to aquire data with DAQ until it reaches a certain point and then stop collecting so that it can do its process (only once for all times criteria is met), and then loop around till again collecting after DAQ drops back below certain point looking to once again reach that point.  Another flat sequence is going outside of this where I want to put the prompt and have a user input to affect how many times that that the inner loop is run (No a For Loop instead of the while loop will not work either for other reasons). 
    I just want to know if after the program starts you can have a user input that will change the effect of the rest of the programs action based on the number inputed.

  • How to get Open Balance for the year and Total Ending Balance?

    For a given account, how to get Open Balance for the year (Cumulative Ending Balance) and Total Ending Balance (Cumulative Ending Balance)?
    Is there any function module available? or should I read from some tables? Please advice.

    Hello Paul,
    You could try calling one of the following BAPIs - see which one meets your requirement. They are documented well so shouldn't be a problem finding out the correct one for your requirements.
    BAPI_GL_GETGLACCBALANCE      
    BAPI_GL_GETGLACCCURRENTBALANCE
    BAPI_GL_ACC_GETBALANCE      
    BAPI_GL_ACC_GETCURRENTBALANCE
    BAPI_GL_ACC_GETPERIODBALANCES
    BAPI_COND_VAL_DECRE_BALANCES
    You might have to put in some of your own logic after the BAPI call to get what you want.
    Hope this helps,
    Cheers,
    Sougata.
    p.s. Also look at FM FAGL_GET_ACCOUNT_BALANCE
    Edited by: Sougata Chatterjee on May 7, 2008 11:47 AM

  • How can i  display output in the same selection screen?

    I've a requirement. Suppose in my selection screen there are three input fields. On the basis of this selection screens input It will  display the output in the same selection screen. Can it be possible? .
    Can it be possible to modify the default screen no for the selection screen 1000?
    Thanks in advance.
    Abhijit

    Hi Abijit,
    Whatever changes made in STANDARD SELECETION SCREEN 1000 or screens generated using 'SELECTION-SCREEN' statements, are not permanent.
    It will get back to its original appearance, while you execute again or some time later.
    Whenever you get into 'CHANGE' mode of these screens, an information will be displayed as follows ;
    Selection screen: Report generation makes screen
    changes ineffective
    Regards,
    R.Nagarajan.

  • How to hide the specified rows in the output of the report?

    Hello all,
        I have a requirement where i have to hide some of the lines (<b>initial 6 lines</b> that is <b>6 rows</b>) in the output of the report.
    How would I go about doing this?
    Thanks for you time.

    Hello Sai,
    I believe this is query output ( e.g., )
    Country   Sales
    India        $100
    USA        $200
    Germany  $300
    You want to hide the line Germany  $300
    Case 1:
        If you can change the query, Filter on Country and exclude Germany
    Case 2:
        If you can not change the query, use url appending and filter out Germany
    Check webapi reference for the exact commands
    Case 3:
        Only if you are using the NW2004s front-end, Report designer will be available for you. In this, you can delete the rows that you do not want and publish in web.
    Case 1 and 2 solutions are available in older versions of front-end as well.
    Regards,
    Sheik Bilal

  • How can I disable the output of the domain name after a getent request?

    I use an iPlanet DS 4.13 to resolve the hostnames to IP-adresses in my company network. I have several scipts in use which use the getent command to resolve name to IP, but if I do a 'getent hosts hostname' I get an output like this:
    123.123.123.123 hostname.domainname
    How can I disable the output of the domainname? I just want to get back the IP-adress and the hostname?!
    Help, please?!

    The enrty in Ur DS for name to ip resolution might
    have been given in the format "hostname.domainname" for the hostname.so if U remove the domainname it would resolve to the host name only.Check the attribute field in Ur directory server where U've entered the hostname.

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • I deleted most visited, latest headlines, getting started, yahoo, youtube, apple in mozilla's folder,how to get it back like the first time i installed? thx

    i deleted most visited, latest headlines, getting started, yahoo, youtube, apple in mozilla's folder,how to get it back like the first time i installed? thx

    if you hid the menu bar and the navigation bar simply press the alt button, this will bring back the menu bar and form there you can right click and select which bars you want shown

  • I am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    i am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    When you make a DNG that's like making another raw file, so you will need to convert the DNG file just like your original raw. Don't use the Save button in the raw converter. That's just a link to the DNG converter. Normally you would click Open instead and then save in the editor as a jpg or other image format of your choice.

  • How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    Use a normal question, and do not add the score to the total score. That will give you a correct score at the end. But the total number of questions, that system variable will still take into account all questions. You'll need a user variable, and calculate its value by subtracting 1 from the system variable cpQuizInfoTotalQuestionsPerProject. Same for the progress indicator if you want to show it?
    Customized Progress Indicator - Captivate blog
    If you want to allow Review, you'll have to tweak as well. You didn't specify the version, and all those questions I now mentioned.
    And my approach, since you talk about only one question: create a custom question, because you'll have total control then.

  • How to get boot camp in the emac

    how to get boot camp in the emac

    Furthermore, eMacs can only emulate the Windows environment, whereas Intel CPU Macs including the iMac you have running 10.6.8 can virtualize Windows.  Emulation is a poor man's solution, because software is used to replace functions that normally take place with hardware.  You can use the iMac to do any data conversion before it gets sent back to the eMac over a network.  See my FAQ* regarding Windows on the Mac:
    http://www.macmaps.com/macosxnative.html#WINTEL

  • To get the output  in the chart for a single selection

    Hi all,
    I used a query to get the output of the table, and for the same query i have  created a view to get the result in the chart.
    to get the output of the table for  a particular region i have created an input field and added value help to it. When i selected one particular region, i will be getting the data, in the table. But when i select a particular row in the table i need to get the data of that particular row only in the chart. (which i am getting)
    But when i select multiple regions at a time, then i am facing the issue. I get result of multiple regions data(at a time two rows are displayed in the chart) in the chart. where in i want to get data only for one region (only one row needs to get selected at a time) to get the result.
    Can any one throw a light of what needs to be done here.
    Thanks,
    Rani

    Hi Rani,
    I am not sure if I understand your question exactly, but it sounds like you need to set the selection mode for your table to "Single". If you do that the user will only have the possibility of selecting one row at a time in the table; they will not be able to select multiple rows.
    You make that setting in the Configure Element panel for the table.
    I hope this suggestions helps.
    Margaret

  • How to send the output of the 1st BPEL process as a input to 2nd BPEL Proce

    Hi,
    I am working on OBPM 11G and my requirement is like below,
    From Mediator we need to call two different BPEL process. 1st one is Synchronous one and second one will be a one way interface. We need to call a java call out from Mediator and then give the output to the first BPEL process. The output from the first BPEL process has to be given to the second BPEL process with a filter condition.
    However we have achieved to call Java callout as well as call to two different BPEL process but facing issues in sending the output of the first BPEL process as a part of input to the second BPEL process.
    Any help on this would be appreciated.
    Bibhu

    Hi,
    Why do you need the third step, if the second step is a Numeric Limit Test step type, you can setup the limits of this step for your required limits of 11V and 12V. Your result is returned from your VI to Step.Results.Numeric which will be evaluated in the Status Expression giving you a Pass / Fail status.
    Look at the example TestStand\examples\demo\..\Computer Motherboard Test\computer.seq
    But to answer your reoriginal question, some additional information is required.
    What are your inputs and outputs assigned to in TestStand, do you use the Step properties, Locals, FileGlobals?
    Regards
    Ray Farmer
    Regards
    Ray Farmer

Maybe you are looking for