NEED ALTER TABLE ALTER COLUMN FOR DATE FORMAT

Need something like this :
ALTER TABLE ABC
ALTER COLUMN DATE1 AS (DD/MM/YYYY)
need to appear in this format (29/03/2014) in the table.
also needs to be recorded in DB in that format.

changed system date format, works. Thanks!
You should always store values as dates itself in date/datetime related field in SQLServer
The formatting can very easily be done in your front end (presentation layer) using format function
Even in T-SQL you can use CONVERT or FORMAT functions to get the date values in the format you want
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page
I don't follow you? Anyway, Olaf Helper's answer was the solution.
SQL Server has a data type called DATETIME. To correctly query dates, it is easier to use this as it allows the SQL engine to do all the calculations for you, also the canonical format for dates in any database language is YYYY-MM-DD, this ensures correctly
tiered dates that are stored in the right order. The way you store data and the way you display it should be kept as two seperate entities. This is the ISO standard and has been thoroughly investigated ...alot to say the least. This is where the term "front-end"
and "back-end" developers come from, and also the distinction between server-side and client-side scripting.
To cut a long story short, take the advice of the multiple professionals here, and follow standards otherwise you'll find yourself stuck, or worse, your legacy code will make someone tear their hair out.

Similar Messages

  • Input Value long enough for date format ,Error in executing parallel query

    Hi,
    My Table: ANML( ID, STATUS,B_DATE,B_MONTH,B_YEAR, DEATH_DATE)
    status 1 for alive and 2 for dead.
    i wrote a view to get age.
    as
    create or relace view view1 as
    select top."ID",top."STATUS",top."DOB",top."DEATH_DATE",top."ANML_AGE",top."DAYSDIFF",
    CASE
    WHEN anml_age < 1
    THEN 'D'
    ELSE 'M'
    END age_unit,
    CASE
    WHEN anml_age < 1
    THEN TO_CHAR (daysdiff || ' Day(s)')
    WHEN anml_age < 12
    THEN TO_CHAR (anml_age || ' Month(s)')
    WHEN MOD (anml_age, 12) = 0
    THEN TO_CHAR (ROUND (anml_age / 12, 0) || ' Year(s) '
    ELSE TO_CHAR ( ROUND (anml_age / 12, 0)
    || ' Year(s) '
    || MOD (anml_age, 12)
    || ' Month(s)'
    END age_string
    from
    (SELECT a.*,
    CASE WHEN status IN ( 1)
    THEN FLOOR(MONTHS_BETWEEN(TRUNC(SYSDATE),dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(MONTHS_BETWEEN(death_date,dob))
    END anml_age,
    CASE WHEN status IN (1)
    THEN FLOOR(TRUNC(SYSDATE)-TRUNC(dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(TRUNC(death_date) - TRUNC(dob))
    END daysdiff
    from (
    SELECTanml.id, status,
    TO_DATE ( DECODE (b_date,
    NULL, 1,
    b_date
    || '-'
    || DECODE (b_month,
    NULL, 1,
    b_month
    || '-'
    || b_year,
    'dd-mm-yyyy'
    ) DOB,
    death_date
    FROM anml
    WHERE b_year IS NOT NULL
    ) a) top
    when i tried to fetch all values from view its working fine.
    But when i tried to fetch values based on condition like as follows,
    select * from view1 where anml_age > 20 and anml_age<30
    I am getting error like:
    Input Value long enough for date format and Error in executing parallel query
    Please tell me wht is wrong.

    Here is your formatted code
    create or relace view view1 as
    select top."ID",top."STATUS",top."DOB",top."DEATH_DATE",top."ANML_AGE",top."DAYSDIFF",
    CASE
    WHEN anml_age < 1
    THEN 'D'
    ELSE 'M'
    END age_unit,
    CASE
    WHEN anml_age < 1
    THEN TO_CHAR (daysdiff || ' Day(s)')
    WHEN anml_age < 12
    THEN TO_CHAR (anml_age || ' Month(s)')
    WHEN MOD (anml_age, 12) = 0
    THEN TO_CHAR (ROUND (anml_age / 12, 0) || ' Year(s) '
    ELSE TO_CHAR ( ROUND (anml_age / 12, 0)
    || ' Year(s) '
    || MOD (anml_age, 12)
    || ' Month(s)'
    END age_string
    from
    (SELECT a.*,
    CASE WHEN status IN ( 1)
    THEN FLOOR(MONTHS_BETWEEN(TRUNC(SYSDATE),dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(MONTHS_BETWEEN(death_date,dob))
    END anml_age,
    CASE WHEN status IN (1)
    THEN FLOOR(TRUNC(SYSDATE)-TRUNC(dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(TRUNC(death_date) - TRUNC(dob))
    END daysdiff
    from (
    SELECTanml.id, status,
    TO_DATE ( DECODE (b_date,
    NULL, 1,
    b_date
    || '-'
    || DECODE (b_month,
    NULL, 1,
    b_month
    || '-'
    || b_year,
    'dd-mm-yyyy'
    ) DOB,
    death_date
    FROM anml
    WHERE b_year IS NOT NULL
    ) a) top

  • Missing Standard Dimension Column for data load (MSSQL to Essbase Data)

    This is similar error to one posted by Sravan -- however I'm sure I have all dimensions covered -- going from MS SQL to SunOpsys Staging to Essbase. It is telling me missing standard dimension, however I have all accounted for:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last): File "<string>", line 23, in ? com.hyperion.odi.essbase.ODIEssbaseException: Missing standard dimension column for data load
    at com.hyperion.odi.essbase.ODIEssbaseDataWriter.loadData(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    I'm using multiple time period inputs -- BegBalance,Jul,Aug,Sep,Oct,Nov,Dec,Jan,Feb,Mar,Apr,May,Jun (target has all of those in place of Time Periods)
    I'm using hard coded input mapping for Metric, Scenario, Version, HSP_Rates and Currencies. -> 'Amount', 'Actual', 'Final', 'HSP_InputValue','Local' respectively.
    The only thing I can think of is that since I'm loading to each of the months in the Time Periods dimension (the reversal was set up to accomodate that)... and now its somehow still looking for that? Time Periods as a dimension does not show up in the reversal -- only the individual months named above.
    Any ideas on this one??

    John -- I extracted the data to a file and created a data load rule in Essbase to load the data. All dimensions present and accounted for (five header items as similar here) and everything loads fine.
    So not sure what else is wrong -- still getting the missing dimension error.
    Any other thoughts?? Here's the entire error message. Thanks for all your help on this.
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 23, in ?
    com.hyperion.odi.essbase.ODIEssbaseException: Missing standard dimension column for data load
         at com.hyperion.odi.essbase.ODIEssbaseDataWriter.loadData(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
         at org.python.core.PyMethod.__call__(PyMethod.java)
         at org.python.core.PyObject.__call__(PyObject.java)
         at org.python.core.PyInstance.invoke(PyInstance.java)
         at org.python.pycode._pyx8.f$0(<string>:23)
         at org.python.pycode._pyx8.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java)
         at org.python.core.PyCode.call(PyCode.java)
         at org.python.core.Py.runCode(Py.java)
         at org.python.core.Py.exec(Py.java)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Caused by: com.hyperion.odi.essbase.ODIEssbaseException: Missing standard dimension column for data load
         at com.hyperion.odi.essbase.ODIEssbaseDataWriter.validateColumns(Unknown Source)
         ... 32 more
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Missing standard dimension column for data load
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)

  • Alter Table Add column not null default value

    I want to add two columns to a table with not null and default as 0 for both columns
    Can i write the whole in one statement or do i have to split statement
    I tried this, but didn't work
    alter table DWSODS01.DWT00301_ORD_DTL_OMS add (
    COMB_ORD_FLG NUMBER(5,0) default 0 not null,
    COMB_ORD_NO NUMBER(12,0)
    default 0 not null);
    How can i modify the code?

    user10390682 wrote:
    I tried this, but didn't workSince you are specifying default values, it should work (regardless if table DWSODS01.DWT00301_ORD_DTL_OMS is empty or not):
    SQL> select count(*) from emp1
      2  /
      COUNT(*)
            14
    SQL> alter table emp1 add (
      2  COMB_ORD_FLG NUMBER(5,0) default 0 not null,
      3  COMB_ORD_NO NUMBER(12,0)
      4  default 0 not null);
    Table altered.
    SQL> desc emp1
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    COMB_ORD_FLG                              NOT NULL NUMBER(5)
    COMB_ORD_NO                               NOT NULL NUMBER(12)
    SQL> What error are you getting?
    SY.

  • Sum values in last row for date format "hh24:mi"

    Hi,
    I have a big problem creating a sum row with date data.
    I created a sql view where the result looks like that:
    SELECT category_name,
    user_name,
    b_mmyyyy,
    b_1, ..., b_31
    FROM view_category_user_booking
    category_name, user_name, b_1, ..., b_31
    category1, user1, 122008, 01:00, ..., 03:30
    category2, user1, 122008, 02:00, ..., 01:00
    category3, user1, 122008, 00:00, ..., 00:15My goal is to integrate a sum row at the end for the columns b_1 ... b_31
    category_name, user_name, b_1, ..., b_31
    category1, user1, 122008, 01:00, ..., 03:30
    category2, user1, 122008, 02:00, ..., 01:00
    category3, user1, 122008, 00:00, ..., 00:15
    Sum, user1, 122008, 03:00, ..., 04:45I tried it like that:
    select decode(grouping(category_name),1,'Summe',category_name),
    sum(to_number(replace(b_1,':',','))) as b_1,
    sum(to_number(replace(b_31,':',','))) as b_31
    from category_user_booking
    where user_name = 'user1'
    and b_mmyyyy = '122008'
    group by rollup(category_name)But the result isn't really successful
    category_name, b_1, b_31
    category1, 1, 3,3
    category2, 2, 1
    category3, 0, 0,15
    Sum, 3, 4,45Is there somebody with an idea?
    Thanks ahead,
    Tobias

    Hi Avinash,
    the problem is not the grouping it is the date format.
    Instead of a value like 5,4 > I want 05:40 or 1,75 > I want 02:15 in the sum value.
    In my table all time values are saved in the format hh24:mi.
    I don't know how to get that via a sql statement.
    Output I want:
    category_name, user_name, b_1, ..., b_31
    category1, user1, 122008, 01:00, ..., 03:30
    category2, user1, 122008, 02:00, ..., 01:00
    category3, user1, 122008, 00:00, ..., 00:15
    Sum, user1, 122008, 03:00, ..., 04:45Regards,
    Tobias

  • InputDate Column Filter Date Format Problem

    Hi,
    I have an af:table with filterable columns and some of these columns are based on Timestamp VO attributes.
    When I enter a date filter - either manually or from the associated date picker, the filter is applied correctly using a date format of dd/MM/yyyy.
    However, when the table is subsequently refreshed, the filter value is still present but has been re-formatted to "yyyy-MM-dd hh:mi:ss" format (default format for a Timestamp datatype?). The an error appears in the column filter component - "Error: The date is not in the correct format".
    If I want to retain the filter value across queries, how can this be achieved?
    My table column is defined as follows:
    <af:column sortProperty="#{bindings.ViewDataVO1.hints.LastReadingDate.name}"
                                                   filterable="true" sortable="true"
                                                   headerText="#{bindings.ViewDataVO1.hints.LastReadingDate.label}"
                                                   id="c59"
                                                   rendered='#{bindings.ViewDataVO1.hints.LastReadingDate.displayHint != "Hide"}'
                                                   displayIndex="#{bindings.ViewDataVO1.hints.LastReadingDate.displayHeight}">
                                            <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                                </af:inputDate>
                                            </f:facet>
                                            <af:outputText value="#{row.LastReadingDate}" id="ot59">
                                                <af:convertDateTime pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                            </af:outputText>
                                        </af:column>I've tried messing with the properties of the af:convertDateTime component, but I'm thinking the problem is in the population of the filter facet inputDate with the vs.filterCriteria.LastReadingDate value. This does not appear to be re-formatted for display - but I don't know how to manipulate this value...
    Or is there a better way? This seems more complicated than it should be...?
    By the way, I am using JDeveloper 11.1.2.1.0 for my development.
    Thanks.

    Does it work fine if you change the pattern for convertDateTime?
    I.e
    change
    <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="#{bindings.ViewDataVO1.hints.LastReadingDate.format}"/>
                                                </af:inputDate>
                                            </f:facet>to
    <f:facet name="filter">
                                                <af:inputDate value="#{vs.filterCriteria.LastReadingDate}" id="id4">
                                                    <af:convertDateTime
                                                                        pattern="dd/MM/yyyy"/>
                                                </af:inputDate>
                                            </f:facet>-Arun

  • Need query to list columns and data

    Hi all,
    I am having a requirement that to compare two identical rows based on empno and list the columns and data which columns are varied.
    SQL> select * from emp1 where empno=7369;
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980       2000                    20
          7369 SMITH      PRO             7788 17-DEC-1980       2100                    20if we see above data - columns mgr,sal and job have different data but same having same employee number
    Now i want to display the columns which are having different values for a given perticular employee having identical rows with employee number
    Note : in my original table i have 300 columns around. above explained is sample example for understanding
    thanks
    krishna.

    Hi,
    If you want a variable number of columns, depending on the data found, then you'll have to use dynamic SQL.
    I suggest you don't do that. I recommend String Aggregation , that is, concatenating the variable number of items into one big string column, formatted so that ir looks like differenct columns. That is, you might get output like this:
    EMPNO MISMATCHED_DATA
          JOB       MGR       SAL
    7369 CLERK     7902      2000
    7369 PRO       7788      2100Notice that the output consists of 3 rows and 2 columns.
    The 1st row displayed serves as a header. (The actual header has the actual, generic column name, mismatched_data.)
    Here's one way to get output like that:
    VARIABLE  data_width     NUMBER
    EXEC      :data_width := 10;
    WITH     unpivoted_data          AS
         SELECT       e.empno
         ,       DENSE_RANK () OVER ( PARTITION BY  e.empno
                                      ORDER BY          e.ROWID
                             )                    AS r_num
         ,       c.column_name
         ,       c.column_id
         ,       RPAD ( COALESCE ( CASE  c.column_name
                                        WHEN  'ENAME'       THEN  e.ename
                                    WHEN  'JOB'       THEN     e.job
                                    WHEN  'MGR'       THEN  TO_CHAR (e.mgr)
                                  WHEN  'HIREDATE'       THEN  TO_CHAR (e.hiredate, 'DD/MM/YYYY HH:MI:SS AM')
                                -- ... more columns in your real problem
                            END
                          , CASE  c.column_name
                                WHEN  'SAL'       THEN     TO_CHAR (e.sal)
                                WHEN  'COMM'         THEN  TO_CHAR (e.comm)
                                WHEN  'DEPTNO'    THEN  TO_CHAR (e.deptno)
                            END
                   , :data_width       -- maximum column width
                   )                         AS d
         FROM    emp1               e
         JOIN       user_tab_columns     c  ON     c.table_name     = 'EMP1'
         WHERE     e.empno     IN (7369)        -- any 1 or more empnos
    ,     got_val_cnt     AS
         SELECT     u.*
         ,     COUNT (DISTINCT d) OVER ( PARTITION BY  empno
                                        ,              column_name
                             )      AS val_cnt
         FROM    unpivoted_data     u
    ,     discrepancies     AS
         SELECT  v.*
         FROM     got_val_cnt     v
         WHERE     val_cnt     > 1
    ,     relevant_columns     AS
         SELECT DISTINCT  column_name
         ,           DENSE_RANK () OVER ( ORDER BY  column_id)     AS c_num
         FROM     discrepancies
    SELECT       d.empno
    ,       REPLACE ( SYS_CONNECT_BY_PATH ( NVL ( d
                                         , RPAD (' ', :data_width)
                             , '~'
                  , '~'
                ) AS mismatched_data
    FROM            discrepancies          d     PARTITION BY ( d.empno
                                              , d.r_num
    RIGHT OUTER JOIN  relevant_columns     r     ON         r.column_name = d.column_name
    WHERE     CONNECT_BY_ISLEAF     = 1
    START WITH     r.c_num          = 1
    CONNECT BY     r.c_num          = PRIOR r.c_num + 1
         AND     d.empno          = PRIOR d.empno
         AND     d.r_num          = PRIOR d.r_num
        UNION ALL
    SELECT    NULL          AS empno
    ,       REPLACE ( SYS_CONNECT_BY_PATH ( RPAD (column_name, :data_width)
                                   , '~'
                , '~'
                )     AS mismatched_data
    FROM      relevant_columns
    WHERE       CONNECT_BY_ISLEAF     = 1
    START WITH     c_num          = 1
    CONNECT BY     c_num          = PRIOR c_num + 1
    ORDER BY  empno          NULLS FIRST
    ;You can specify any number of empnos to be included in the report.
    You really want a CASE expression that has a WHEN clause for every column in your table, but CASE expressions have a maximum of (I believe) 128 WHEN clauses. If you really have 300 rows, you'll have to break that down into smaller groups. In the query above, I used 2 CASE expressions in a COALESCE function, where each of the CASE expressions had no more than 4 WHEN clauses. You may have to use 3 CASE expressions, each with 100 WHEN clauses.
    This solution does not assume there are exactly 2 rows per empno; there can be any number.
    If all the rows for an empno are completely identical, that empno will not be included in the output. This includes the situation where a given empno is unique.
    Again, you can get separate columns for each mismatched item, using dynamic SQL, but it's even more convoluted than the query above.

  • Issue with table ROOSPRMSF entries for data source 0FI_AP_4

    Hi Experts,
    I am facing with an issue where we found incosistencies with table ROOSPRMSF in R/3 system.
    In BW , we have done initializations based on fiscal period selections (none of the selections overlap) for data source 0FI_AP_4.
    We have done in total 7 initializations. So in BW system in table RSSDLINITSEL we have 7 initialization requests.
    But in R/3 system we have 49 records for data source 0FI_AP_4 in ROOSPRMSF table out of which 42 are invalid records.
    I suspect that these 42 invalid records are created due to the execution of program RSSM_OLTP_INIT_DELTA_UPDATE when the tables ROOSPRMSF are actually holding the 7 initialization request entries.   Due to this each and every initialization request is linked to rest of the other intialization requests and ended with 49 records in table ROOSPRMSF table.
    Now our data loads are running fine but daily a short dump is raised . In the daily loads, BW init records in RSSDLINITSEL are compared with ROOSPRMSF entries and all the other 42 records which are invalid are written into system log and a short dump is raised.
    In order to fix these inconsistencies i checked for OSS note 852443. (Point 3 in OSS note)
    But it is specified to delete the delta queue for data source 0FI_AP_4 in RSA7 and instructed to execute the program RSSM_OLTP_INIT_DELTA_UPDATE so that the ROOSPRMSF table will be reconstructed with valid records available in RSSDLINITSEL. 
    From OSS note 852443 point 3
    "3. If the RSSDLINIT table in the BW system already contains entries, check the requests listed there in the RNR column in the monitor (transaction RSRQ). Compare these entries with the entries in the ROOSPRMSF and ROOSPRMSC tables with the INITRNR field. If, in the ROOSPRMSF and ROOSPRMSC tables for your DataSource source system combination, there are more entries with different INITRNR numbers, use transaction RSA7 in an OLTP source system to delete all entries and then use the RSSM_OLTP_INIT_DELTA_UPDATE report mentioned in the next section. For a DataMart source system, delete the entries that you cannot find in the RSSDLINIT table using the procedure described above."
    My question is if we delete the delta queue in RSA7 then all the tables in R/3 (ROOSPRMSF, ROOSPRMSC, Time stamp table) and BW (RSSDLINITSEL, initialization requests will be deleted) will be cleared. Then how will the program RSSM_OLTP_INIT_DELTA_UPDATE  copy entries into ROOSPRMSF table in R/3 ?
    Could any one please clarify this ?
    Thanks
    Regards,
    Jeswanth

    Hi Amarnath,
    Did you unhide the new field in RSA6 and regenerated the DataSource?
    Often SAP will populate newly added fields (belonging to the same (set) of table(s) used for extraction) automatically (e.g. SAP uses 'move-corresponding' in it's extractor-code, or, in this case, reading all fields from the DD, FM BWFIU_TRANSFORM_FIELDLIST).
    If the DataSource looks fine to you and the field is still not populated in RSA3 you can't go without a user-exit.
    Grtx,
    Marco

  • Parsing Issue in Filter For Date Format

    Hi Folks,
    I am having Parsing Issue on "Key Date" Object in Universe. See the Error and Code below for your review
    Error: Parse Failed: Exception: DBD, The value entered is not valid. It must adhere to one of the following formats.
    YYYYMMDD
    DD.MM.YYYYState:N/A
    Code:
    <OPERATOR VALUE="AND"><OPTIONAL><FILTER KEY="0I_DAYIN"><CONDITION OPERATORCONDITION="Between"><CONSTANT TECH_NAME="@Prompt('Day Interval From','A','Calendar Day\LovDay IntervalBase',mono,primary_key)"/><CONSTANT TECH_NAME="@Prompt('Day Interval To','A','Calendar Day\LovDay IntervalBase',mono,primary_key)"/></CONDITION></FILTER></OPTIONAL><FILTER KEY="0P_KEYDA"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Key Date','D',,mono,free)"/></CONDITION></FILTER></OPERATOR>
    This universe is created by someone else and client need to modify it with a calendar but i did not modify it yet however its already giving me the hard time. Kindly advise, any kind of help will be appreciated
    Thanks

    Hi,
    With the information provided I cannot for sure get to the error but here is what I would check.
    Firstly, I was wondering if the 5th parameter in the @Prompt can be Primary_Key. I thought it would be either free or constrained.
    Secondly, please the LOV values for the @ prompt are being populated from 'Calendar Day\LovDay IntervalBase'. So I would check the date format being used there.
    Third, the To and From dates are alphaneumeric and not dates, so I am not sure how the comparision would happen.
    Hope this helps.
    Regards,
    Madhur

  • Column in DATE format

    Hello Everybody
    I have a report did Apex, this report has a column which data type is DATE but by default the Apex put it in the format : DD-MM-YYYY HH:MI:SS
    But I only want that his column has the format DD/MM/YYYY
    I know that is posible convert this field using the function TO_CHAR(date, format) but in the report I want to sort this field considering that this filed is in date data type not in char.
    Also I know that I can use the function EXTRACT for concatening the day, month and year and after convert to date in the format 'dd/mm/yyyy'; but I don´t want to write many code.
    I don't want to do some like this:
    TO_DATE(
    EXTRACT( 'DAY' FROM DateFiled )||'/'|| EXTRACT( 'MONTH' FROM DateFiled )||'/'|| EXTRACT( 'YEAR' FROM DateFiled ), 'DD/MM/YYYY' )
    Do you know how to convert to this date format (DD/MM/YYYY) preserving the format?
    I expect your prompt reply.
    Any help will be very appreciated.
    Best Regards

    Hi Eric
    One of the really cool features of the later versions of APEX is the ability to set a default "Application Date Format".
    This is done in the Application xx>Shared Components>Definition then select the "Globalization" tab.
    You can select from a list of pre-defined date formats, or enter your own.
    My preference is "DD-Mon-YYYY" which is not in the list.
    Just leave your date fields as regular DATE type in the select (no formatting in the select).
    This Application Date Format is then used as the default for ALL dates for which you don't specifically set (another) date format
    This is also selecable in the Display options of a "Date Picker (Use Application Date Format)" LOV - for any date page items that you want to provide a date picker.
    This really simplifies the effort in getting a consistent look and feel - and keeping a constant standard throughout the application.
    The other benefit is that you can make a change in one place, and ALL the dates (without a specific date format specification) will change format - just like that.
    This is just one of the features that makes APEX the most productive - and cool - systems around.
    Enjoy!
    Mike

  • Obiee 11g upgrade issue for date format

    Hi,
    I am facing a date format issue with obiee 11g report. This statement cast(cast(current_date as char) as timestamp) is failing with "not a valid month" error in obiee 11g. This worked fine with obiee 10g.
    I am basically trying to set the date to 12:00:00 am of the sysdate. Below is what I am trying to achieve:
    timestampadd(sql_tsi_hour, 1, cast(cast(current_date as char) as timestamp)))
    the above statement fails in obiee 11g.
    Thanks for your help,
    AP

    I dont think you need any functions to get the required output, try to set the date format as below
    [FMT:timeStampShort]
    If helps mark
    Thanks
    Edited by: Srini VEERAVALLI on Apr 23, 2013 4:18 PM
    I think with format and then the below should work with no issues.
    timestampadd(sql_tsi_hour, 1,current_date)
    I think you are wasting time by posting here, just do it. You no need any ones permissions to do it ;)
    Edited by: Srini VEERAVALLI on Apr 24, 2013 8:55 AM

  • Column properties data format save option

    Hello,
    When I am in Answers, I choose a column, then I click on column propoerties (icon with a hand), data format tab, here I only have the save option when I am with the Administrator user. Is it possible to have this option with another user ? I have tested to create a user which belongs to the Administrator group, but I can't see this option.
    Thanks in advance for your help;

    hi
    this is possible, by assigning the user to presentation server administrators group in the answers.
    1. login with administrator and click on settings > administration
    2. go to Manage Presentation Catalog Groups and Users
    3. click on edit properties for existed Presentation server administrators group
    4. Click on Add New Member
    5. click Show users and Groups appears in the add member window (note: to appear that user in this list, you must login answers with that user at least once)
    6. Click on add option provided corresponding to that user you wanted
    7. Click Finished
    Now you check with the other user login.. you will see the save option

  • Need your help regarding Conditional Chart Data formatting

    I have just started using BI, so I am sorry if what I am asking is a FAQ or a very simple question.
    I have a Line Bar Combo chart whose bars I have colored differently according to some conditions. When I drill down from a year/month series to the day of a particular month, though, the conditional formatting is lost.
    http://img141.imageshack.us/img141/5677/biimage.jpg
    Can anyone suggest me if I am missing something in the program options or if there is any workaround to this behavior?
    Thanks a lot in advance.

    Letz say you have colored the year black when it is 2008 and you display it in the graph and while you drill down from year to quarter in the back ground an adiitional column will be added (Quarter) and the conditional formatting will be still there for the year but will be very small(like a dot) as your quarter is exposed on the X axis.
    The deeper you drill the wider your x-axis will be and the smaller your formatting looks.
    You cant controll the drill. It will mimic what is present in the compound layout set up at the parent level.If you need to avoid multiple columns appearing on your X-axis and do some changes to your graphs then you need to navigate
    instead of drill. if the report is 3 levels deep then it has to be 3 diff reports(maintenance will be high)
    It will be seemless to the users whether you navigate or drill. Just a suggestion. There are some things which we need to compromise :)
    Thanks
    Prash

  • Class Cast Exception for Date Format .

    Hi Friends ,
    I am getting a error for casting type from Object to Date type .
    Could you please some one help me . I am using a prepared statement in OAF for inserting a data .
    All fields are inserting except Date format .
    My code in controller as follows :
    try {    String StartDate=row.getAttribute("StartDate").toString();
    // String StartDate="30-Apr-2011";
    DateFormat formatter ;
    Date StartDate1;
    formatter = new SimpleDateFormat("dd-MMM-yy");
    StartDate1 = (Date)formatter.parse(StartDate);
    //System.out.println("Today is " +date );
    pstmt.setDate(12,StartDate1);
    } catch (ParseException e)
    {System.out.println("Exception :"+e);    }
    Thanks in Advance ,
    Keerthi

    Thanks so Much for the quick response .
    Exception Details.
    oracle.apps.fnd.framework.OAException: java.lang.ClassCastException at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2637) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) ## Detail 0 ## java.lang.ClassCastException at SONY.oracle.apps.inv.xx_slapg.webui.ServiceRequestCO.processFormRequest(ServiceRequestCO.java:153) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) java.lang.ClassCastException at SONY.oracle.apps.inv.xx_slapg.webui.ServiceRequestCO.processFormRequest(ServiceRequestCO.java:153) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534)
    Here is my code .
    java.util.Date StartDate=(java.util.Date)row.getAttribute("StartDate");
    ------------------------------------------------------------------------------------------------

  • Validating JTextField for Date Format

    hello,
    everybody.
    i am trying to perform a validation on text field, i.e if the input is in a date format then it will show, other wise it will consume the character.
    please help me out of this problem i am stucked with it.
    waitng for reply. the following is my code.
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    import java.text.*;
    public class RilJDateField implements KeyListener
         JFrame frame;
         JPanel panel;
         JLabel label;
         JTextField text;
         GridBagLayout gl;
         GridBagConstraints gbc;
         Date date = new Date();
         public static void main(String a[])
              new RilJDateField();
         public RilJDateField()
              panel = new JPanel();
              gl = new GridBagLayout();
              gbc = new GridBagConstraints();
              panel.setLayout(gl);
              label = new JLabel("Only Date Format");
              text = new JTextField(5);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 1;
              gl.setConstraints(label,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 1;
              gl.setConstraints(text,gbc);
              panel.add(label);
              panel.add(text);
              text.addKeyListener(this);
              text.requestFocus();
              frame = new JFrame("RilJDateField Demo");
              frame.getContentPane().add(panel);
              frame.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent we)
                             System.exit(0);
              frame.setSize(300,300);
              frame.setVisible(true);
         public void keyTyped(KeyEvent ke)
         public void keyPressed(KeyEvent ke)
              DateFormat df;
              df = DateFormat.getDateInstance();
              df = (DateFormat) ke.getSource();
              if(!(df.equals(date)))
                   ke.consume();
         public void keyReleased(KeyEvent ke)
    }

    hi,
    thanks very much, u gave me great idea.
    according to ur suggestion i used JFormattedTextField as well as SimpleDateFormat, but while giving keyevent i am getting the error,
    so please if possible reply for this.
    the error is
    java.lang.ClassCastException
         at RilJDateField.keyTyped(RilJDateField.java:61)
         at java.awt.Component.processKeyEvent(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)and my source code is
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    import java.text.*;
    public class RilJDateField implements KeyListener
         JFrame frame;
         JPanel panel;
         JLabel label;
         JFormattedTextField text;
         GridBagLayout gl;
         GridBagConstraints gbc;
         Date date = new Date();
         SimpleDateFormat formatter;
         public static void main(String a[])
              new RilJDateField();
         public RilJDateField()
              panel = new JPanel();
              gl = new GridBagLayout();
              gbc = new GridBagConstraints();
              panel.setLayout(gl);
              label = new JLabel("Only Date Format");
              text = new JFormattedTextField();
              text.setColumns(10);
              formatter = new SimpleDateFormat("dd mm yyyy");
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 1;
              gl.setConstraints(label,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 1;
              gl.setConstraints(text,gbc);
              panel.add(label);
              panel.add(text);
              text.addKeyListener(this);
              text.requestFocus();
              frame = new JFrame("RilJDateField Demo");
              frame.getContentPane().add(panel);
              frame.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent we)
                             System.exit(0);
              frame.setSize(300,300);
              frame.setVisible(true);
         public void keyTyped(KeyEvent ke)
              Date date = (Date) ke.getSource();
              if(!(date.equals(formatter)))
                   ke.consume();
         public void keyPressed(KeyEvent ke)
         public void keyReleased(KeyEvent ke)
    }

Maybe you are looking for