Achieving chronological sort on a date column with month function

Hello all ,
I have a a date column(start_date) on which I applied 'MONTHNAME' function to extract the month name
out of the date . i.e. 4/24/2013 will return 'Apr' .
While trying to achieve a sort on this , its returning alphabetical sorting , i.e.
aug , apr , dec , jul ,jun etc .
So achieving a chronological order , I created a logical column 'sort_month' . In the expression section,
I wrote , month(start_date) . so this return numeric values of months , i.e . 1,2,3, 4 etc.
Now , in 'start_date' column properties i have selected this 'sort_month' column ,
sort on column . So , this should add a chronological sorting order to start_date column ?
well its not working !
Am I missing anything here ?

Logical column general properties and set 'sort order column' to months
Edited by: Srini VEERAVALLI on Apr 23, 2013 1:55 PM

Similar Messages

  • Not able to save date column with custom date format. in OBIEE 11g

    Hi,
    I have migrated one report from OBIEE 10g to 11g. There is a date column with customized date format(i.e. Default format is 'dd-MMM-yyyy' and I have used 'MMM-yyyy').
    But when I use this custom format and try to save the report in 11g its giving this below error.
    ''Catalog object privilege validation failed for user to path /shared/ALM BI/Finacial Results/History Income Statement Detail.
    You do not currently have sufficient privileges to save a report or dashboard page that contains HTML markup.
    This HTML might be present in column headings, table headings, text views, narrative views, the print header,
    or the print footer and must be removed before saving.''
    Please let me know what changes I need to do for this.
    Regards,
    Ambika Nanda.

    Hi ,
    privilage issues...check the security settings once..
    Thanks,
    Ananth

  • Date column with format mask 'hh12:mi pm'

    let's say the user input record as shown below :
    trip At01 At02
    1 9:30 AM 12:30 PM
    At02 & At02 are date column with format mask 'hh12:mi pm'. When the user input 9:30 and tab to next item, the column will display as 09:30 AM. Then when user input 12:30 at AT02, it will display as 12:30 PM.
    Anyway, if I enter 1:00 at AT02, it will display as 01:00 AM. Actually I want to display as 01:00 PM. I still can go back to the field to edit it manually but is there a way that I can do as mentioned ?
    Please advise.
    Thanks,
    Shu Wen

    You are going to have to write your own validation logic to do this - You'll have to decide what point AM shoudl be defaulted and what point PM should be used. I don't think that there is a format mask that provides this functionality.

  • How to fetch the Date column(or Month column) from the file name from the specified path in ODI 11g

    Hi ALL,
    Can any one help us regarding How to fecth the Date column(or month column) from the file name specified in the path in a generalized way .
    For example :
    file name is :subscribers (Cost) Sep13.csv is specified in the below path
      E:\Accounting\documents\subscribers (Cost) Sep13.csv
    here I need to fetch the "Sep13" as a Date column in the ODI 11g in the generalized way.
    Can any one help us in this case as early as possible.

    I would suggest using a piece of Jython code for this.  Something like this...
    import os
    import os.path
    filelist  = os.listdir(E:\Accounting\documents\)
    for file in filelist:
    datestr = file[19:-4]
    You'd need to work out what to do with datestr next...  perhaps write it to a table or update an ODI variable with it.
    Hope this is of some help.

  • How to drill date (column )into month in xcelsius

    Hi,
    I am fresher to Xcelsius. I need to know how to drill the date column into month, then further drilling down month to day.
    I have 2 columns
    Date                       Revenue
    1/1/2010                 452553
    2/2/2011                  97992
    3/5/2011                  23526
    4/3/2011                 63563
    If i click " 1/1/2011" date column, i need to see the corresponding month data in seperate chart( i need to get the detailed data).
    I need to know how the datas should be arranged in excel.
    Thanks in Advance
    Regards,
    Abirami

    Hi Abirami,
    To filter out date, you can use calendar component in Xcelsius. This article explains how to use the calendar component in an interactive way.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b05b0244-0453-2e10-b4b3-fab707baddaf
    Then with the help of an invisible combo box as explained in the article to could get just the selected month's data in bar chart.
    Hope this helps.
    Regards,
    Anju Saseendran

  • Query To update a date column with a date of my interest

    All,
    How to update a column in a table which is in date format with a date of my interest??
    Pls suggest.

    Please detail :
    1. what exactly you are trying to do
    2. what exactly you have done
    Nicolas.

  • Get the month from a date column with the calculated column

    I am trying to get the month from a date field with the help of calculated column. However I get this syntax error whenever I want to submit the formula:
    Error 
    The formula contains a syntax error or is not supported. 
    the default language of our site is German and [datum, von] is a date field.

    Hi,
    I have created two columns
    Current MM-YY
    Calculated (calculation based on other columns)
    Today
    Date and Time
    Current MM-YY is calculated value with formula as
    =TEXT(Today,"mmmm")
    But the output shows as December instead of May.
    I have tried =TEXT([Datum, von];"mmmm") but no help.
    I am trying to populated the column automatically with current month..ex: if its May the field should show May, next month it should show June an so on.
    Any kind help is grateful.
    Regards,
    Pradeep

  • Which type of index is useful for date columns with time stamp

    Hi all,
    I am using date column in the where clause of an SQL Query. The values stored in the date column are includes timestamp. The query is very slow and there is no index on the date column.
    Can any body suggest which index is better on date columns
    Thanks

    I am using date column in the where clause of an SQL Query.Dates a re hard queries to tune. This ...
    WHERE start_date BETWEEN to_date('01-SEP-05') AND to_date('02-SEP-05')...probably requires a very different execution plan to this...
    WHERE start_date BETWEEN to_date('01-JAN-01') AND to_date('02-SEP-05')Just bunging an index on the date column may speed up your specific query but break something else. So be careful.
    Cheers, APC

  • Calculated List column with Now() function

    I am designing a Sharepoint list for recording entry and exit times. I have one column which has been set as time function with a calculation of =Now() a second column called [Out] with a Yes/No choice and a 3rd calculated column [Time Out] with a
    formula =IF(Out="Yes",NOW(),"On Site"). This works fine until you add data into other columns then the [Time Out] column keeps on changing time. How can I make the[TimeOut] column only show the time when the [Out] column changes to yes
    and keep that time.

    Hi
    another approach
    if first column represent the time when the item is creted, you don't need it. You could use [Created] column value
    Next, set [Out] columnn with default value NO, and next you can use 2 scenarios
    First one  -  you don't use the calculated column, you create a new one  [TimeOut], text column. with default value="On Site"
    You should also attacha  workflow to your list, which will start when an item is changed ( only in this case ! ) wnd which will analyse if [Out]=yes - in this case will fill [TimeOut] with string value for now() value
    Second one. you keep the calculated column, but the formula should contain converting datetime in string value
    More details about this formula for converting time in text
    http://msdn.microsoft.com/en-us/library/office/bb862071%28v=office.14%29.aspx
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • How to convert rows into columns with decode function

    Hi,
    How to convert rows into columns with the help of decode function in oracle.
    thanks and regards
    P Prakash

    say
    col1 col2
    1 10
    2 20
    3 30
    then use
    select col1,
    sum(decode(col2,10,10)) "new1"
    sum(decode(col2,20,20))"new2"
    sum(decode(col2,30,30))"new3"
    from table_name
    group by col1;
    we used sum u can use ny function if wont u have to give the column name i.e col2 name also
    so i think u got it nw
    regards

  • Add Column with Varchar2 function

    i created a program unit (function) that returns a varchar2(100). How do i create a link between the function and a new column on the report for each record? I created a query that returns two columns now i want to apply this function to a third column to get some formatted text.

    Make sure the column type property for the formula column is set to CHARACTER, and the width is set to 100 to match up with your function. And the PL/SQL prolog of the formula column should read:
    function CF_<some_name>Formula return Char is
    FYI, in Reports, CHAR and VARCHAR get formatted the same way (e.g., trailing blanks are ignored).

  • How to sort multiple t:dataTable columns with Tomahawk?

    Hello, I'm using Tomahawk with MyFaces and I'm trying to sort my table by couple of columns. I have year and month cols and when I sort by year and two years are equal, I want to subsort by the months. I actually tried to create a sort method taking sortColumn and ascending as params, but it didn't get invoked by the app. I also tried to put commandButton as headers which call sort(ActionEvent), but it still didn't get invoked. May anyone show me how could I write a backend for the sorting?
    Thanks in advance!
    Regards,
    Mario

    Yes, there is a comparator. I don't find the problem so much TOmahawk specific, I'm actually trying to solve it without it too. But I found where the problem is - in the <t:column> tag - when sortable attribute is enabled, it doesn't call any external methods, no matter if they are actions or actionListeners.
    So when I removed the sortable attribute, my backend method got called. :)
    Regards,
    Mario

  • Trying to compare date columns with differing formats...

    I have an app that created a series of tables via ODBC using ANSI standard datatypes. For most, this isn't a problem, but one in particular is driving me crazy: TIMESTAMP. In Oracle, it shows up as a TIMESTAMP(6). I don't want to mess with the app's tables, so every time there is an insert to their tables, I have a trigger which creates records in corresponding tables I build using standard Oracle datatypes (DATE).
    I have one function that gets called by several of the triggers that retrieves me a specific row to update, and it uses the value from this TIMESTAMP field in the WHERE clause like this (the value is passed into the function as a parmeter):
    SELECT TIMECARD_ID INTO tc_id FROM TS_TIMECARD_MAIN
    WHERE EMP_ID = e_id AND VEHICLE_ID = v_id
    AND IN_TIME <= logout AND OUT_TIME IS NULL; <----
    I seem to have a formatting issue, because unless the "logout" date is a full day later than IN_TIME, it doesn't pull the record (my code does a check to verify there is only one record matching the criteria but I haven't posted it all here for simplicity). I need it to be able to select the correct record with a one second difference.
    I have NLS_TIMESTAMP_FORMAT set to 'YYYY-MM-DD HH24.MI.SS.FF' and NLS_DATE_FORMAT set to 'YYYY-MM-DD HH24:MI:SS'. The relevant describes are included below. Can anyone suggest how to format my query (I expect to use the TO_DATE and TO_CHAR to compensate, but haven't found the right set) so that it resolves properly? Date math is a pain, but it is critical to my purposes.
    Vendor's table
    FIELD3_DATETIME TIMESTAMP(6)
    My table
    TIMECARD_ID NOT NULL NUMBER(10)
    EMP_ID NOT NULL NUMBER(10)
    IN_TIME DATE
    OUT_TIME DATE
    VEHICLE_ID NUMBER(10)
    Also, some sample default output from each table - not sure why formatting is wierd on my table.
    Vendor's table
    UNIQKEY STATUS FORM_ID VEHICLE_NUMBER CREATED_DATETIME
    11515780978071234994451 0 21423 24005 28-JUN-06 05.10.14.000000 PM
    CHECK_DVIR NEW_DVIR SERVICEABLE DETAILS
    1 1 1 everything ok
    INSPECTION_TIME ODOMETER LATITUDE LONGITUDE
    28-JUN-06 05.12.12.000000 PM 119885.1 44.7889490425587 -95.2167677879333
    My table
    TIMECARD_ID EMP_ID IN_TIME OUT_TIME VEHICLE_ID
    5 20044 28-JUN-06 24005

    That sounds a bit complicated. If you post your query I'm sure there will be a simpler approach, perhaps something like
    where  date_timestamp between cast(sysdate -30 as timestamp) and systimestampor if you prefer
    where  date_timestamp between systimestamp - interval '30' day and systimestampas discussed on Re: convert timestamp to date.

  • A date column, with timestamp..how to remove timestamp

    Hi,
    I have a table name CATCH, with one of its fieldnamed DATE, using DATE datatype.
    The date format incudes timestamp,can anyone help me how to remove the timestamp part.
    I only want the date part only. I have tried this:
    Update CATCH set DATE=to_char(date,'DD-MON-YYYY');
    but the result of all the date inside the table still having timestamp.
    then i use this:
    Update CATCH set DATE=to_date(date,'DD-MON-YYYY');
    and the result still the same.
    Can anyone advice on this? pls.
    Thanks

    user9353110 wrote:
    Thank you very much..if thats the case, can we remove the timestamp when creating view for this table?no, you can never remove the time component of a DATE.
    If you don't want to show the time for a date (display purposes only!), use TO_CHAR to "transform" the DATE to a string with the appropriate format mask
    SQL> alter session set nls_date_format = 'dd-mm-yyyy hh24:mi'
      2  /
    Session altered.
    SQL> select sysdate
      2    from dual
      3  /
    SYSDATE
    17-03-2010 09:28
    SQL> select to_char (sysdate, 'dd-Mon-yyyy')
      2    from dual
      3  /
    TO_CHAR(SYSDATE,'
    17-Mar-2010
    SQL> select to_char (sysdate, 'yyyy-MON-dd')
      2    from dual
      3  /
    TO_CHAR(SYSDATE,'
    2010-MAR-17
    SQL> NOTE: the last two example are not DATEs! They are STRING

  • To select table which has TAB as data column with in

    Hi All
    I have a table which has column type defined as TAB type. When I try selecting the table in PL/SQL developer, I got below error.
    What should I do? Even SQL* Plus shows the same error!
    SQL> select *
      2  from my_tab_cap
      3  /
    from my_tab_cap
    ERROR at line 2:
    ORA-00904: : invalid identifierThanks in advance.
    Message was edited by:
    guru paran
    Changed the table name.

    You probably want to help us out with all your ddl:
    create table tab2 (my_tab_col my_type ) nested table my_tab_col store as my_tab;
    create type my_type as table of varchar2(100);
    declare
    v_type my_type := my_type();
    begin
    v_type.extend(4);
    v_type(1) := 'I like table types1';
    v_type(2) := 'I like table types2';
    v_type(3) := 'I like table types3';
    v_type(4) := 'I like table types4';
    insert into tab2(my_tab_col) values (v_type);
    end;
    select * from tab2;
    MY_TAB_COL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
    VARCHAR(I like table types1,I like table types2,I like table types3,I like table types4)     

Maybe you are looking for

  • External Interface and Mouse Clicks

    I'm new to writing ActionScript. I am working in .NET (C#) environment using AxShockwaveFlashObjects. I am simply trying to react to a mouse click on the Flash ActiveX Control. I have inserted the code in a layer only used for script: import flash.ex

  • Logical system Name Change Via Transport

    Hi All, Recently we made changes in parallel processing profile customizing table  (/SAPAPO/SDP_PAR) and created entries for Macro Jobs and CIF. For Application "CIF Delta Report", Logical system is mandatory and in Dev we gave the APO Dev Logical Sy

  • 2013 Mac Pro DisplayPort Monitor does not wake from Sleep.

    On my 2013 MP I have dual monitors: One connected DVI-to-MiniDisplayPort a ViewSonic 24" Second connected DisplayPort-to-MiniDisplayPort a MonoPrice 27" 2560x1440 When the computer comes out of Sleep or Off the 27" display does not come out of Sleep

  • Update iOS 5.1 caused loss of Data

    I just updated my iphone 4s to the new OS and now all of my Calendar data is gone! Then i check the icloud that's empty too! What can i do to get it back. this is very aggravating and I do not have a back up anywhere all my appointments are gone! HEL

  • Long running BPEL - transaction rollback

    Hi All, I have a bpel process that is taking over 30 minutes to complete. The process reads over 3000 records from database and transforms to EDI. The XSLT transform is taking 95% of the processing time. One option for me is to increase the Session t