Convert Date to Text, Display Unique Values Only

Hi. I have a table that receives information on a weekly basis. The record includes a number and a date. (For example, "ID, 150, 01/15/2005") I am using the following to convert the whole date into the format I want it to be displayed in:
select "ID",
TO_CHAR (DATEFIELD, 'MON-YY')
"NUMBERFIELD"
from "TABLENAME"
where "DATEFIELD" BETWEEN '01-JAN-05' and SYSDATE
The query/conversion works fine, however I want to display only one total for any given month. That is, (now) if there are two entries in the month of January, the output will list "JAN-05" twice and display the unique value of each record. Instead, I would like to display all January records as a single "JAN-05" output with a cooresponding total. I'm thinking "unique" or a "group by" function, but so far I have been unsuccessful. Any suggestions? Thanks!

column XXX noprint
select
       TO_CHAR (DATEFIELD, 'MON-YY') MONTH
      ,SUM(NUMBERFIELD) sum_of_numbers
      ,TO_CHAR (DATEFIELD,'YYYYMM') XXX
  from TABLENAME
where DATEFIELD >= trunc(to_date('01.01.2005','dd.mm.yyyy'))
   and DATEFIELD < trunc(sysdate+1)
group by TO_CHAR (DATEFIELD, 'MON-YY')
         ,TO_CHAR (DATEFIELD,'YYYYMM')
order by
          TO_CHAR (DATEFIELD,'YYYYMM')

Similar Messages

  • Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache of sent text?

    Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache sent the text?
    For example, I posted an article on a news site, but found that only a small part of my article was posted.

    I'm not sure whether Firefox saved that information. There is a chance that it is in the session history file, especially if you haven't closed that tab yet. To check that:
    Open your currently active Firefox settings folder (AKA your Firefox profile folder) using
    Help > Troubleshooting Information > "Show Folder" button
    Find all files starting with the name sessionstore and copy them to a safe working location (e.g., your documents folder). In order to read a .js file, it is useful to rename it to a .txt file. Or you could drag it to Wordpad or your favorite word processing software.
    The script will look somewhat like gibberish, but if you search for a word in your article that doesn't normally appear in web pages, you may be able to find your data.
    Any luck?
    For the future, you might want to consider this add-on, although I don't know how long it saves data after you submit a form: [https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-recovery/].

  • How to display field value only once in REUSE_ALV_GRID_DISPLAY

    hi experts,
                   i am using REUSE_ALV_GRID_DISPLAY, for alv outpur display.but i want one of the field in output ,not to display the value which is of same, it have to be displayed only once, I mean i have a number which contains multiple line items corresponding, here i want to display the field value only once when it is repeating , for the same header number, how can i achieve it

    Hi,
    check the sample code,
    REPORT  Z_ALV.
    Database table declaration
    TABLES:
      sflight.
    Typepool declaration
    TYPE-POOLS:
      slis.
    Selection screen elements
    SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS:
      s_carrid FOR sflight-carrid.
    SELECTION-SCREEN END OF BLOCK blk_1.
    Field string to hold sflight data
    DATA:
      BEGIN OF fs_sflight ,
        carrid   TYPE sflight-carrid,      " Carrier Id
        connid   TYPE sflight-connid,      " Connection No
        fldate   TYPE sflight-fldate,      " Flight date
        seatsmax TYPE sflight-seatsmax,    " Maximum seats
        seatsocc TYPE sflight-seatsocc,    " Occupied seats
      END OF fs_sflight.
    Internal table to hold sflight data
    DATA:
      t_sflight LIKE
       STANDARD TABLE
             OF fs_sflight .
    Work variables
    DATA:
      t_fieldcat TYPE  slis_t_fieldcat_alv,
      fs_fieldcat LIKE
             LINE OF t_fieldcat.
    *START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM get_data_sflight.            " Getting data for display
      PERFORM create_field_cat.            " Create field catalog
      PERFORM alv_display.
    *&      Form  create_field_cat
          Subroutine to create field catalog
          There is no interface paramete
    FORM create_field_cat .
      PERFORM fill_fieldcat USING   'Carrier Id'    'CARRID'   '2'.
      PERFORM fill_fieldcat USING   'Connection No' 'CONNID'   '1'.
      PERFORM fill_fieldcat USING   'Flight Date'   'FLDATE'   '3'.
      PERFORM fill_fieldcat USING   'Maxm.Seats'    'SEATSMAX' '4'.
      PERFORM fill_fieldcat USING   'Seats Occ'     'SEATSOCC' '5'.
    ENDFORM.                                    "create_field_cat
    *&      Form  fill_fieldcat
          Subroutine to fill data to field column
         -->p_seltext      Column label
         -->p_fieldname    Fieldname of database table
         -->p_col_pos      Column position
    FORM fill_fieldcat  USING
                        p_seltext    LIKE fs_fieldcat-seltext_m
                        p_fieldname  LIKE fs_fieldcat-fieldname
                        p_col_pos    LIKE fs_fieldcat-col_pos.
      fs_fieldcat-seltext_m  = p_seltext.
      fs_fieldcat-fieldname  = p_fieldname.
      fs_fieldcat-col_pos    = p_col_pos.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat.
    ENDFORM.                    " fill_fieldcat
    *&      Form  get_data_sflight
          Subroutine to fetch data from database table
          There is no interface parameter
    FORM get_data_sflight .
      SELECT carrid
             connid
             fldate
             seatsmax
             seatsocc
        FROM sflight
        INTO TABLE t_sflight
       WHERE carrid IN s_carrid.
    ENDFORM.                    " get_data_sflight
    *&      Form  alv_display
          Subroutine for ALV display
          There is no interface parameter
    FORM alv_display .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          it_fieldcat   = t_fieldcat
        TABLES
          t_outtab      = t_sflight
        EXCEPTIONS
          program_error = 1
          OTHERS        = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_display
    End of code

  • Display Key Values only on filter screen

    Hello all,
    I have one specific requirement. When user runes any query (based on an infoset) , data is displayed. After which if user presses right clicks on data filed -> Select filter value. Then one  Filter screen is displayed. Values from this filter screen are displayed as text values.
    I want it to display as key value. This particular infoobject is in coumpounding.
    I have already tried changing Bex properties at infoobject level and RSD1, it does not have any effect.
    can anyone suggest any option.
    Edited by: priyanka s on Sep 15, 2008 10:41 AM

    Hi Priyanka,
    In BI 7.0, these options are available in the definition of InfoProvider itself.
    For DSO:
    Right Click on Key/Data Fields --> Provider Specific Properties of the InfoObject --> Display (Column)
    For Cube:
    Right click on Dimensions --> Provider Specific Properties of the InfoObject --> Display (Column)
    Set the required properties here and you will get the required results.
    Hope this time you get it right
    Regards,
    Yogesh

  • Unable to convert dates to text in scanned PDFs

    I am using Adobe Acrobat XI Pro. I am converting scanned images to text by recognizing the text using OCR.
    However, some portions of my file, specially dates in format MM/DD/YY format are not being converted to text. I cannot even convert them to text by clicking "Find All Suspect" under "OCR Suspects" since they are not being listed.
    Please help.

    Find All Suspects does not convert to text but it gives the option to accept a text as converted by the OCR. However, in case of the dates, this is not an option since the date is being treated as an image. Any other method which might help to recognize dates as text?

  • Hyperion Financial Reporting - Export to Excel converting Data to Text

    We are using Hyperion Financial Reporting 11.1.2.2 with Hyperion Workspace 11.1.2.2 reporting on an ASO Essbase cube version 11.1.2.2.
    When we export a report to Excel any data values that are displayed in the report with a negative ('-', '()', etc.) sign come into Excel as a text value. The cell has the green flag and the single quote in it denoting this a text field. The format is listed as 'Custom'. Updating the format does not remove the single quote.
    The same result is happening if we display the natural sign in the report or if we flip the sign in the report. This DOES NOT happen when choosing the export query ready, only when using the File -> Export -> Excel.
    Does anyone know if there is a hot fix or service pack or configuration to resolve this? How about a work around?
    I thought I remember this happening in 9.2 and being resolved in 9.3. We have recently upgraded from 9.3.1 to 11.1.2.2 and the issue is happening again.
    The users would like to export the formatted report to Excel and be able to interact with the data cells as numbers.

    The issue is reported as a bug. Installing patch 14625370 (11.1.2.2.302) and/or 16088101 (11.1.2.2.303) should fix the problem.

  • Fetching data from conf_out displaying 1 value

    Dear gurus
    i have made a smart form for sales order invoice im having a problem with the following code.
    my sales order invoice contains to line items with different reelsize one is 600 and other is 700 mm
    the conf_out table is getting only the value of 600 its not getting the other value can you guide me.
    DATA: i_config LIKE conf_out OCCURS 10 WITH HEADER LINE.
      READ TABLE i_config WITH KEY atnam = 'REELSIZE'.
        IF sy-subrc = 0.
          wa_item_itab-siz =  i_config-atwrt.
        ENDIF.
    Regards
    Saad Nisar

    did that but no result
    the problem is that the conf_out structure is not saving the other value 700.
    is there any other table where the values of reelsize which is displayed in T-code vf03 is stored if so please tell me..

  • Hierarchy with postable node -- data will be displayed on leaves only

    Hello,
    I have programmed a generic data source for hierarchy of BOM which should display CO-PCP data along the BOM hierarchy, comparable to transaction CK13N on R/3.
    The hierarchy is loaded successfully, having the following info objects:
    0SOURSYSTEM
    0PLANT
    QMATERCO  (header material of BOM)
    QMATPLCO (BOM components of inner nodes and leaves).
    QMATERCO and QMATPLCO are compounded to 0PLANT, each node is loaded with its individual unique node ID in order to post line items for each BOM component on higher and lower level. The hierarchy will be loaded for characteristic QMATPLCO (having defined 0PLANT and QMATERCO within hierachy definition).
    Now I have setup an info cube containing 0PLANT, QMATERCO and QMATPLCO, additionally some other descriptive characteristics and key figures.
    The line items given in R/3 source tables are posted into the info cube for inner nodes and leaves (all of them QMATPLCO), each line item is dedicated to one QMATPLCO node.
    Problem: The query will display line items for leave nodes only but not for all inner nodes although the nodes are displayed with green characteristic icon if I check the hierarchy itself. Furthermore, in BeX if I drag and drop QMATPLCO into the row, I can choose the loaded top node of the hierarchy but not any inner node or leave node.
    What is missing?
    Message was edited by:
            Stephan Hofmann
    Message was edited by:
            Stephan Hofmann
    Edited by: Stephan Hofmann on Sep 4, 2008 2:02 PM

    Complete own strategy for this problem has to be developed.

  • Is there a possibility to change the Message Text displayed on Value Help

    Hi All,
    When i click value help icon against Transportation Zone, it is displaying first 500 entries. And i am getting a message saying " AVAILABLE ENTRIES : 500". Can i change this text to user specific ones say "First 500 entries shown: more records exist". if there is any procedure, kindly let me know..this will b of gr8 help..
    Bye,
    Eureka

    First you need to know in which component this F4 help is implemented. Then it will be easier to identify where this text is stored, but normally it should come from an OTR text.
    If you post additional details, maybe we can help you.
    Xavier

  • ORA-01403: no data found   when displaying a value from an   array

    I have a very simple pl/sql procedure like below which gives an error
    SQL> exec p_ks2;
    BEGIN p_ks2; END;
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "KINASE.P_KS2", line 21
    ORA-06512: at line 1
    if i uncomment the for loop the procedure works ... the loop has nothing to do with my array or what i am doing after it..
    could anyone help me to understand why i need a loop like that or what i am doing wrong when i am not having the loop there.
    ---- procedure
    CREATE OR REPLACE
    PROCEDURE p_ks2 as
    TYPE mdata IS TABLE OF number INDEX BY BINARY_INTEGER;
    data1 mdata;
    k integer;
    m number;
    begin
    data1(1) := 10;
    data1(2) := 20;
    data1(3) := 30;
    data1(4) := 40;
    data1(5) := 50;
    k :=3;
    --for mm in 10..11
    --loop
    -- m := mm;
    --end loop;
    dbms_output.put_line('value of data(' || k || '): ' || data1(k));
    end;
    /

    here is what i am trying.. when i do not have the for loop it fails. when I have the for loop it works eventhough for loop is really not doing anything related to my array.
    and in 10.x both works without error.
    I noticed you have the for loop uncommented when you posted the screen. Did it work when you have commented those lines out?
    SQL> select * from v$version
    2 ;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Linux: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL> CREATE OR REPLACE
    2 PROCEDURE p_ks2 as
    3
    4 TYPE mdata IS TABLE OF number INDEX BY BINARY_INTEGER;
    5 data1 mdata;
    6 k integer;
    7 m number;
    8
    9 begin
    10 data1(1) := 10;
    11 data1(2) := 20;
    12 data1(3) := 30;
    13 data1(4) := 40;
    14 data1(5) := 50;
    15
    16 k :=3;
    17 --for mm in 10..11
    18 --loop
    19 -- m := mm;
    20 --end loop;
    21
    22 dbms_output.put_line('value of data(' || k || '): ' || data1(k));
    23
    24
    25 end;
    26 /
    Procedure created.
    SQL>
    SQL> exec p_ks2;
    BEGIN p_ks2; END;
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "KINASE.P_KS2", line 21
    ORA-06512: at line 1
    SQL>
    SQL> CREATE OR REPLACE
    2 PROCEDURE p_ks2 as
    3
    4 TYPE mdata IS TABLE OF number INDEX BY BINARY_INTEGER;
    5 data1 mdata;
    6 k integer;
    7 m number;
    8
    9 begin
    10 data1(1) := 10;
    11 data1(2) := 20;
    12 data1(3) := 30;
    13 data1(4) := 40;
    14 data1(5) := 50;
    15
    16 k :=3;
    17 for mm in 10..11
    18 loop
    19 m := mm;
    20 end loop;
    21
    22 dbms_output.put_line('value of data(' || k || '): ' || data1(k));
    23
    24
    25 end;
    26 /
    Procedure created.
    SQL> exec p_ks2;
    value of data(3): 30
    PL/SQL procedure successfully completed.
    SQL>

  • Display characterstics value only if user populates respcetive variable

    Hi Friends,
    I have a strange situation wherein I have to show results according to characteristics only if user has populated respecitve var. for ex, i have cal year and cal month in query. If user only populates cal year than cal month should not be dispalyed in output and if user populates cal month then cal year shoudlnt be dispalyed in output.
    any help is welcome,
    thx,
    purvang

    Hi,
    write CMOD code for the two variable in i_step = 2 .
    using flag option which will be set if any of the variable value is entered. SO based on it value other value will be blank.
    Hope it helps,
    Uday.

  • Convert data in the text file to table in DBL

    Hi guys
    I wanted to convert data in text file which are in multiple rows and columns in DBL format to a table to b seen in labview as DBL format.
    I had tried looking and working at the example but in vain , i just cant produce anything
    pls help. or write me a short example..thanks

    Are you dealing with a table or an array.  For an array, just use the Read spreadsheet file from the File I/O palette.
    For a table,  you will have to convert the number to a string and setting the appropriate precision and width, then write the 2-D string array to the table.
    Message Edited by Ravens Fan on 05-20-2008 11:54 PM
    Attachments:
    Example_VI_BD6.png ‏3 KB

  • Problem displaying registry value

    Hi,
    I believe I have some basic issues with the setwindowtext function. I have a value stored in the registry of 10 characters, type REG_SZ. The regerror parameter for the RegGetValue funtion below is 0, so this function I believe should be okay. But when I
    try to display the value, only the first of the ten registry characters are displayed, and I don't understand why. I wondered therefore if someone could give me a hint about what could be wrong.
    #include "Winreg.h"char outtxt[25];
    #define BUFFER 25
    char registervalue[25];
    DWORD BufferSize = BUFFER;
    LONG WINAPI regerror;
    regerror = RegGetValue(HKEY_LOCAL_MACHINE, L"SOFTWARE\\DhruvaNada\\Settings", L"mrg", RRF_RT_ANY, NULL, (PVOID)&registervalue, &BufferSize);
    sprintf( outtxt, "%s", registervalue);
    SetWindowTextA(Control[13], outtxt);
    Thanks in advance.

    On 17/03/2015 12:56, Vahmat wrote:
    I believe I have some basic issues with the setwindowtext function. I have a value stored in the registry of 10 characters, type REG_SZ. The regerror parameter for the RegGetValue funtion below is 0, so this function I believe should be okay. But when I
    try to display the value, only the first of the ten registry characters are displayed, and I don't understand why. I wondered therefore if someone could give me a hint about what could be wrong.
    #include "Winreg.h"char outtxt[25];
    #define BUFFER 25
    char registervalue[25];
    DWORD BufferSize = BUFFER;
    LONG WINAPI regerror;
    regerror = RegGetValue(HKEY_LOCAL_MACHINE, L"SOFTWARE\\DhruvaNada\\Settings", L"mrg", RRF_RT_ANY, NULL, (PVOID)&registervalue, &BufferSize);
    sprintf( outtxt, "%s", registervalue);
    SetWindowTextA(Control[13], outtxt);
    You are mixing Unicode and ANSI text here, without proper conversions.
    The fact that you called RegGetValue() and specified strings using the L"" prefix, means that you are using a Unicode build (which is fine, and has been the default since VS2005).
    However, you should be consistent with this Unicode mode, and use that also for the other strings in your code. So, you should use wchar_t instead of char, and for example have:
    // Use wchar_t, no "char"
    wchar_t reigsterValue[25];
    Similarly for "outtxt".
    And you should use swprintf() (or better its safe version swprintf_s()) instead of sprintf().
    In addition, you should use just SetWindowText(), which expands to SetWindowTextW() in Unicode builds.
    If, for some reason, you really want to output ANSI/MBCS strings, you should properly
    convert the resulting string read from the registry into an ANSI/MBCS string, either explicitly via the WideCharToMultiByte() API, or using some helper like ATL's CW2A:
    https://msdn.microsoft.com/en-us/library/87zae4a3.aspx
    HTH,
    Giovanni

  • Configure prompt resticting number of months of data to be displayed

    Hi,
    I have the following reporting requirement:
    Dashboard Prompt:
    Month_Start_Date:
    Week_Start_Date:
    Depending on whether user selects month or week create another filter such that for month it should have values 1,2,3,4
    and for week 1,2...13
    This implies that the report can show a maximum of 4 months data or 13 weeks of data.
    for eg. if user selects
    jun-09
    3
    Then the report should show:
    Dim1 jun-09 Jul-09 Apr-09
    Measure1 Measure1 Measure1
    Could you please help in create this prompt and report.
    Thanks and Regards,
    Parn

    Can we have ur screens hots of the app before upgrade and after upgrade.
    As per my knowledge of WDJ, SPA by default always had Overview screen and, users had option to click edit and fields will show up for edit.
    For making read only we have to make explicit changes, from personalization or from self service admin role etc. May be ur team did some explicit changes through personalization and self service admin role.
    To make the fields readonly etc, you can try in these ways:
    1. Personalization
    2. From V_T588MFPROPC settings
    3. V_T7XSSPERSUBTY for the infotype you have to check "Data must be displayed in read-only"

  • Can I convert Facebook time Text to Project Siena's Date value ?

    Can I convert Facebook time Text to Project Siena's Date value ?
    I want to show create_time on screen by my Localtime formatted text.
    Facebook time Text = 2014-07-14T11:22+0000
    I want to show = 2014/07/14 18:22
    My Time Zone is +09:00, Osaka/Japan.
    Currently I try it by Text/Replace/Replace/Replace/Left/DateValue/+ , etc.
    And I ask more simple way.
    Regards,
    Yoshihiro Kawabata

    Thank you Andy , and Robin, I can.
    Text(TimeValue(Substitute(ThisItem!created_time,"+0000",".000Z")),"yyyy/mm/dd hh:mm")
    At Facebook Albums's Gallary, I can convert from Facebook created_time to Localtime Text DateTime.
    and I hope more easy way like Excel Power Query's one.
    Regards,
    Yoshihiro Kawabata

Maybe you are looking for

  • Music view in iTunes

    I would like to view the music that's on my iPod Classic (120GB) in the cover flow view from within iTunes, but I can't do so because the grid and cover flow options are grey-ed out. Why is that? Must I be stuck only viewing the music that's on my iP

  • RFC to SOAP error

    Hi,   I am configuring Rfc to SOAP scenario. After all the configuration steps are done as they are required. When I am testing the scenario i.e when I am executing RFC in in one of R3 instance system message is going to XI but message status in XI s

  • HT1430 Need to reset Ipad but don't want to loose data

    Nedd help with the above

  • ABAP Development in portal

    When implementing employee self service and manager self service what are the best practices when creating ids. Are there any SAP programs that will automatically create IDs based on the HR master data table?  This would identify them as either emplo

  • SAP ABAP or FICO

    Hi, First of all i'm new to this community. I just completed my graduation(2010 Engg. passout) and got recruited by an organisation.There i got trained in SAP-ABAP and i'm now clear with the concepts although i have never worked in a ABAP development