Passing date format in sys.dbms_xmlgen

hello all,
i am using following query to generate insert SQL statements
SELECT
'insert into ' || table_name || ' (' || (select rtrim(extract(xmlagg(xmlelement(e, t.column_value.getrootelement() || ',')),'//text()'),',') from table(xmlsequence(t.column_value.extract('ROW/*'))) t) || ') values (' ||
(select dbms_xmlgen.convert(rtrim(extract(xmlagg(xmlelement(e, '''' || t.column_value.extract('//text()') || ''',')),'//text()'),','),1) from table(xmlsequence(t.column_value.extract('ROW/*')))t) || ');' ins_stmt
from user_tables,
table(xmlsequence(dbms_xmlgen.getxmltype('select * from ' || a_TblName ||' WHERE MODIFIEDON >'||a_date).extract('ROWSET/ROW'))) t
where table_name in (select table_name from user_tables where table_name =a_TblName);but when i execute the procedure as
sql> exec   Gen_Insert_Statement('11-jun-2009');
ORA-19202: Error occurred in XML processing
ORA-00904: "JUN": invalid identifier
ORA-06512: at "SYS.DBMS_XMLGEN", line 288
ORA-06512: at line 1
ORA-06512: at "MRILDATA17TEST.GEN_INSERT_STATEMENT", line 22
ORA-06512: at line 2     and if i do this
SQL> exec Gen_Insert_Statement('11-06-2009');
begin Gen_Insert_Statement('11-06-2009'); end;
ORA-01843: not a valid month
ORA-06512: at line 2is there any format to pass date while using XML packages??? i am also not getting in which this issue is occuring??
any suggestion will be appreciable
thanks and regards
VD
Edited by: dixit on Aug 13, 2009 6:15 AM
Edited by: dixit on Aug 13, 2009 6:21 AM

The date issue is coming from
dbms_xmlgen.getxmltype('select * from ' || a_TblName ||' WHERE MODIFIEDON >'||a_date)It is due to the implicit conversion from the internal Date object type to a String type for display. The format is based off the NLS_DATE_FORMAT so varies from system to system. When dealing with dates, it is always best to use either to_char or to_date to ensure there are no errors in converting from one format to the other. That would include adding to_date with a format mask making it part of your Select SQL statement around a_date, such as to_date(a_date, 'DD-MON-YYYY')
Also, if you have any dates in the tables that are being queried, you will run into a similar implicit conversion issue. Oracle does not format dates in the proper XML format of YYYY-MM-DD when building XML in this manner as it uses the NLS_DATE_FORMAT. So you cannot guarantee the INSERT statement will work on another DB with a different NLS_DATE_FORMAT.
As others have asked, why you are trying to build insert statements this way as there is a lot to take into consideration regarding data formats. It seems this has been discussed on the {forum:id=75} forum but that has been some time ago.

Similar Messages

  • How to get Date Format from Local Object.

    Hi All,
    I am new to Web Channel.
    I need to know Date format From date of locale.
    suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC. 
    Is there any way to get Date format from "Locale" object. I should get date format for local object
    I get local object from "UserSessionData" object but how to get Date format from it.
    I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format.  I could not find example which show how to get date format from "Locale" object.
    Any help will be appreciated with rewards.
    Regards.
    Web Channel

    Hi,
    You can get it from "User" or "Shop" business object.
    Try to get User or Shop Business Object as shown below.
    BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
    User user = bom.getUser();
    char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
    If you are seeing "1,234.00" then above code will return "."
    I hope this information help you to resolve your issue.
    eCommerce Developer.

  • Change Date format to Global Standard dd/mm/yyyy

    How do you change the default date format the one the rest of planet Earth use.... ie DD/MM/YYYY. The Nth American format mm/dd/yyyy is not the centre of the known universe.....
    and yes centre is spelt correctly
    iBook G4   Mac OS X (10.4.4)  

    thanks Gerry, my sys prefs are default to the non Nth American, I did manage much later the right click and change the template, however, I'm still using the Trial iWorks'06 so perhaps thats why it didnt pick the "Proper" date format from sys prefs.....!
    Thanks for taking the time to reply... G5 HmmmmNice, I hope to keep going on this until its 3rd birthday, March 17th 2007...
    Take care
    Michael
    iBook G4   Mac OS X (10.4.4)   EirPod - a view from Ireland

  • Date format in XML sys.dbms_xmlgen

    hello all,
    i have posted this question in "general XML " forum also....so please dont mind
    i am using following query to generate insert SQL statements
    SELECT
    'insert into ' || table_name || ' (' || (select rtrim(extract(xmlagg(xmlelement(e, t.column_value.getrootelement() || ',')),'//text()'),',') from table(xmlsequence(t.column_value.extract('ROW/*'))) t) || ') values (' ||
    (select dbms_xmlgen.convert(rtrim(extract(xmlagg(xmlelement(e, '''' || t.column_value.extract('//text()') || ''',')),'//text()'),','),1) from table(xmlsequence(t.column_value.extract('ROW/*')))t) || ');' ins_stmt
    from user_tables,
    table(xmlsequence(dbms_xmlgen.getxmltype('select * from ' || a_TblName ||' WHERE MODIFIEDON >'||a_date).extract('ROWSET/ROW'))) t
    where table_name in (select table_name from user_tables where table_name =a_TblName);but when i execute the procedure as
    sql> exec   Gen_Insert_Statement('11-jun-2009');
    ORA-19202: Error occurred in XML processing
    ORA-00904: "JUN": invalid identifier
    ORA-06512: at "SYS.DBMS_XMLGEN", line 288
    ORA-06512: at line 1
    ORA-06512: at "MRILDATA17TEST.GEN_INSERT_STATEMENT", line 22
    ORA-06512: at line 2     and if i do this
    SQL> exec Gen_Insert_Statement('11-06-2009');
    begin Gen_Insert_Statement('11-06-2009'); end;
    ORA-01843: not a valid month
    ORA-06512: at line 2is there any format to pass date while using XML packages??? i am also not getting in which this issue is occuring??
    any suggestion will be appreciable
    thanks and regards
    VD
    Edited by: dixit on Aug 13, 2009 6:15 AM

    thanks for not replying

  • How to pass date parameter in URL in system date format

    Hi All,
    I am working on a requirement where I need to pass the date parameter in URL. Where date format needs to be system default date format. How can we format date without providing specific date format.
    Also, I got some post which had below example. Can you let me know what this format does.
    '/analysis/report?queryGroupName=Custom-ProjectInfo&TimePeriodBeginning=', <%+%> FCI_CHARFMT(TIME_PERIOD_START_DATE),' <%+%>
    '&TimePeriodBeginning_format=17&link_crumb=true'
    Waiting for response.
    Thanks,
    Saloni

    Hi,
    If you're running this in SQL*Plus, you can use substitution variables.
    If you have a file called my_query.sql, like this
    select    A.agent_no,
              (a.first_name || A.agent_name)     as agent_Name,
              P.Policy_No,
              D.Driver_No,
              D.mvr_predict_score,
           D.mvr_received
    from        policy  P,
           agent   A,
           Driver  D
    where       D.request_mvr_hit   = 'M'
    AND       D.mvr_predict_Score > 540
    And       D.request_mvr          = 'D'
    AND        p.fullkey           = d.fullkey
    AND       p.agent_no          = a.agent_no
    AND       d.mvr_received     >= TO_DATE ('&1', 'DD-Mon-YYYY')          -- New
    AND       d.mvr_received     <  TO_DATE ('&2', 'DD-Mon-YYYY') + 1     -- New
    order by  a.agent_no,
                 CASE  a.producer_type
               when  'S'  then 1
               when  'C'  then 2
               when  'R'  then 3
           end
    ;Then you can run it from SQL*Plus by saying something like:
    @my_query  1-Jan-2009  31-Dec-2009&1 in the script will be replace by the 1st argument (1-Jan-2009) and &2 will be replaced by the 2nd argument (31-Dec-2009).
    Notice that the last condition adds 1 to the argument
    AND       d.mvr_received     <  TO_DATE ('&2', 'DD-Mon-YYYY') + 1     -- Newbut uses the < operator (not <=). The result is that if mvr_received is any time on the last day (e.g. 31-Dec-2009 11:59 pm) will be included.

  • HELP! date pass to script not display in date format

    hi all,
    i want to include final approver date into Puchase Order, and i call up a form, getting the date from CDHDR. however, when i return the date back to the script, the date display in PO are out of date format.
    original : 16.07.2007
    but it shows as : 20070716
    how am i going to change it to the actual proper format in script?
    very thanks for the help first.

    hi,
    but i have other date ( such as create date) which are showing correctly. the create date gets directly from table.
    i tried to use the SET DATE, but there is no charge on it. my actual code is as below:
    /:           PERFORM GET_TEST IN PROGRAM Z_TESTING6
    /:           USING &EKKO-EBELN&
    /:           CHANGING &UDATE&
    /:           ENDPERFORM
    PO            Release Date,,&UDATE&
    can only one help me. thanks

  • Required help with date format

    Hi All,
    I am calling a webservice from plsql, for this I am using UTL_DBWS package. I want to insert the format of date as 'YYYY-MM-DD' only. I used to_char(sysdate, 'YYYY-MM-DD') , but it is throwing error. Please suggest any solution.
    Thanks and Regards,
    Mahesh
    The error details are as follows
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException
    Caught exception while handling request: invalid date: 25-NOV-08
    ORA-06512: at "SYS.UTL_DBWS", line 403
    ORA-06512: at "SYS.UTL_DBWS", line 400

    user6391695 wrote:
    Hi All,
    I am calling a webservice from plsql, for this I am using UTL_DBWS package. I want to insert the format of date as 'YYYY-MM-DD' only. I used to_char(sysdate, 'YYYY-MM-DD') , but it is throwing error. Please suggest any solution.What happens is...
    You convert sysdate into a string of the format YYYY-MM-DD and then you are passing that to a parameter that is a DATE datatype. When you do this oracle has to implicitly conver the string to the DATE datatype. It does this based on the NLS settings of the session which, I would guess, are not of the format YYYY-MM-DD, so it can't understand the string you have passed and fails to convert it to a date.
    Date formats are not something that is stored on the database (assuming you are correctly storing dates as DATE datatype). The format of dates is a display issue and something that should be handled by the user interface. The database stores data, just that, no display formats. ;)

  • ORA-06512: at "SYS.DBMS_XMLGEN", (ORA-00942: table or view does not exist)

    Hey Guys, it's Xev.
    I decide to  use SQL and XML and it works in one scenario, but in another scenario, it doesn't.
    Here is the Code, I am passing in two variables, First, I pass in the table_name and then i pass in the schema.
    If I am doing this with the "user" connected and it's looking in it's own schema, it's find the results, like so, but if i try to execute this code while not
    connected to the same user i am searching on i get this error.
    ORA-19202: Error occurred in XML processing
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_XMLGEN", line 288
    ORA-06512: at line 1
    19202. 00000 -  "Error occurred in XML processing%s"
    *Cause:    An error occurred when processing the XML function
    *Action:   Check the given error message and fix the appropriate problem
    This code works only of you are connected to the user that you are searching on.
    But if you search for another user tables, it's blows up and gives the XML error above...
    SET SERVEROUTPUT ON
    exec DBMS_OUTPUT.ENABLE(1000000);
    VAR search_string VARCHAR2(28)
    EXEC :search_string := '^[0-9]{3}-[0-9]{2}-[0-9]{4}$'
    COLUMN "Searchword"     FORMAT A28
    COLUMN "Table"     FORMAT A9
    COLUMN "Column/Value" FORMAT A50
    SELECT DISTINCT SUBSTR (:search_string, 1, 28) "Searchword",
                     SUBSTR (table_name, 1, 14) "Table",
                     SUBSTR (t.column_value.getstringval (), 1, 50) "Column/Value"
        FROM   dba_tab_cols,
        --where owner = ('&SCHEMA_NAME')
                TABLE
                  (XMLSEQUENCE
                 (DBMS_XMLGEN.GETXMLTYPE
                    ( 'SELECT ' || column_name ||
                     ' FROM ' || table_name ||
                   ' WHERE REGEXP_LIKE
                         (' || column_name || ','''
                        || :search_string || ''')'
                  ).extract ('ROWSET/ROW/*'))) t
      --WHERE  table_name IN ('FIND_TEST')
      WHERE table_name = upper('&TABLE_NAME')
      AND OWNER = upper('&SCHEMA_NAME')
      ORDER  BY "Table"
    Can someone please explain how (DBMS_XMLGEN) works, and why it's throwing that error??
    thanks,
    Xev.

    It has nothing to do with DBMS_XMLGEN.GETXMLTYPE. It simply means user executing your SQL has no select privilege on table &SCHEMA_NAME.&TABLE_NAME.
    SY.

  • Passing date to procedure help

    Hello, this maybe simple question, but I couldn't figure out why I am getting
    ORA-01843: not a valid month.. Here is what I did:
    exec proc(to_date('01/01/2007','MM/DD/YYYY'),to_date(01/30/2007,'MM/DD/YYYY'))NLS setting is: DD-MON-RR
    procedure proc (date1 in date, date2 in date)
    v_date_period varchar2;
    select date_period into v_date_period from t1 where start_date = to_date(date1,'MM/DD/YYYY') and end_date = to_date(date2,'MM/DD/YYYY');
    start_date and end_date are in date MM/DD/YYYY format in the table, but the above code is failed b/c of the above error.
    One thing I noticed that when dates are passed into the procedure, they come in DD-MON-RR format and the comparion never works in cursor. start_date and end_date are in MM/DD/YYYY format. but it works only when to_date(date1,'DD-MON-RR') and to_date(date2,'DD-MON-RR'). How is it working when start_date and end_date are in MM/DD/YYYY format???
    another question is, when I say To_date, does it always convert any date to NLS setting? I used
    to_date('01/01/2007', 'dd/mm/yyyy'), but it doesn't have any effect when it goes to the procedure.. still comes as DD-MON-RR.
    what mistake i am doing? I would appreciate your ans. Thanks,

    I think I got it now. I really didn't need that extra
    conversion within the procedure. It works now. Then let's make sure it's clear for you.
    You are right to consider the NLS_DATE_FORMAT settings, that's good, as most people are unaware of it and really have no understanding whatsoever as to what it does. Perhaps your understanding of it is not quite up to scratch just yet...
    The setting relates to how oracle converts between dates and strings when no format is specified explicitly. e.g.
    SQL> select to_char(sysdate) from dual;
    TO_CHAR(SYSDATE)
    04/03/2008 10:00:11
    SQL> alter session set nls_date_format = 'YYYY MON DD';
    Session altered.
    SQL> select to_char(sysdate) from dual;
    TO_CHAR(SYS
    2008 MAR 04
    SQL> select to_char(sysdate, 'DD/MM/YYYY') from dual;
    TO_CHAR(SY
    04/03/2008
    SQL>Likewise if you convert the other way from a string to a date...
    Firstly with implicit conversion, which will assume the NLS_DATE_FORMAT setting format for the string...
    SQL> select to_date('2008 JAN 01') from dual;
    TO_DATE('20
    2008 JAN 01And then if you explicitly convert specifying the format...
    SQL> select to_date('01/01/2008','DD/MM/YYYY') from dual;
    TO_DATE('01
    2008 JAN 01However if you try and implicitly convert (using the NLS setting) but the string isn't of the correct format...
    SQL> select to_date('01/01/2008') from dual;
    select to_date('01/01/2008') from dual
    ERROR at line 1:
    ORA-01843: not a valid month
    SQL>So now let's look at what you were doing...
    select date_period into v_date_period
    from t1
    where start_date = to_date(date1,'MM/DD/YYYY')
    and end_date = to_date(date2,'MM/DD/YYYY');Your date1 and date2 are already of a DATE datatype. This means that they are already stored in the oracle internal date format. Note: ALL dates are stored the same internally regardless of how they are displayed. e.g.
    SQL> select sysdate, dump(sysdate) from dual;
    SYSDATE
    DUMP(SYSDATE)
    04/03/2008 10:35:20
    Typ=13 Len=8: 216,7,3,4,10,35,20,0
    SQL> alter session set nls_date_format = 'YYYY MON DD HH24:MI'
      2  ;
    Session altered.
    SQL> select sysdate, dump(sysdate) from dual;
    SYSDATE
    DUMP(SYSDATE)
    2008 MAR 04 10:36
    Typ=13 Len=8: 216,7,3,4,10,36,50,0
    SQL>However, you are using the to_date function. This expects the first parameter to be a string and the second parameter is an optional string specifying the format of the first string.
    So it was expecting:
    to_date(<string>,<string>)and you gave it
    to_date(<date>,<string>)When oracle comes across this sort of thing, rather than produce an error it recognises that it is able to do an implicit conversion of datatypes so internally it is doing
    to_date(to_char(<date>),<string>)Note: because it is an implicit conversion within the "to_char" it is using the NLS settings to do this.
    You said your NLS setting was DD-MON-RR, so this is the same as...
    to_date(to_char(<date>,'DD-MON-RR'),<string>)Now look at your code again with the implicit conversions in place...
    select date_period into v_date_period
    from t1
    where start_date = to_date(to_char(date1,'DD-MON-RR'),'MM/DD/YYYY')
    and end_date = to_date(to_char(date2,'DD-MON-RR'),'MM/DD/YYYY');Hmmm, so the to_date function is getting it's first parameter as a string in the format 'DD-MON-RR' and the second parameter is telling it that the first parameter is in the format 'MM/DD/YYYY'.
    The two dates you passed were:
    '01/01/2007'
    and
    '01/30/2007'
    But after the implicit conversion your code looks like...
    select date_period into v_date_period
    from t1
    where start_date = to_date('01-JAN-07','MM/DD/YYYY')
    and end_date = to_date('30-JAN-07','MM/DD/YYYY');As you can see there are numerous problems with this. The first one Oracle errored on was the fact that 30 is not a valid Month as defined by your format string.
    Hopefully that clarifies things a little more for you and you'll understand a little more about the differences between strings, dates and implicit and explicit conversion between the two using format strings and the NLS setting.
    ;)

  • Date format issue in oracle database

    Hi,
    Back end : Oracle 11.2.0.2.0
    Front end : Forms 11g
    In our application we are facing issue with TO_DATE('DD/MM/YYY') Date format conversion.
    Example: TO_DATE(P_date,'DD/MM/YYYY') giving the result as 20-Dec-0009
    In the above eg the Parameter P_date is coming as '20-dec-09' from the front end (forms 11g)
    The Nls_date_format parameter at database level is set as 'DD-MON-RR'
    Its working fine after changing the conversion as TO_DATE(P_date,'DD/MM/RRRR') .- If we do like this , we need to change in many places , so instead of doing this, is there other solution wrt database settings/Application settings where we can change and fix this issue
    pls help us to solve the issue.
    Regards.
    sathish k

    892913 wrote:
    Hi,
    Back end : Oracle 11.2.0.2.0
    Front end : Forms 11g
    In our application we are facing issue with TO_DATE('DD/MM/YYY') Date format conversion.
    Example: TO_DATE(P_date,'DD/MM/YYYY') giving the result as 20-Dec-0009
    In the above eg the Parameter P_date is coming as '20-dec-09' from the front end (forms 11g)
    The Nls_date_format parameter at database level is set as 'DD-MON-RR'
    Its working fine after changing the conversion as TO_DATE(P_date,'DD/MM/RRRR') .- If we do like this , we need to change in many places , so instead of doing this, is there other solution wrt database settings/Application settings where we can change and fix this issue
    pls help us to solve the issue.
    Regards.
    sathish kWell the solution is right in front of you. As you say, your database environment is set to DD-MON-RR so your database is set to use 2 digit years (something most people moved away from with the millenium bug more than 10 years ago now). You can either change all your code to use RRRR as you've found, or change your database NLS setting to DD-MON-RRRR and change your front end application to pass you a date with 4 digit years so you get e.g. '20-dec-2009'.
    So many people worked hard to resolve the millenium bug issues all those years ago, but still we have people, all these years later, who want to reintroduce the problem. So sad.

  • Date format in Report

    Dear All,
    In Bex Query I am passing date in this format mm/dd/yyyy and I want this to be display as dd/Mon/yyyy
    so could you please provide me the solution
    Thx & regards

    Hi,
    Follow these threads hope it will help you..
    date format
    How to get date format DD/MM/YYYY hh:mm into BW format
    Regarding date formatt
    reg : date format conversion from dd.mm.yyyy to mmddyyyy
    Assign points if it helps
    Khaja

  • How to extract  different date format in text file

    well, iam new for using regex api(regular expression), In my project i want to extract the different format of date from the text file... date format will be 3rd june 2004, 03-06-2004, june 3rd and so on....
    can any body give me regular expression to extract the date from the text file...
    i will be very grateful..
    kareem

    date format will be 3rd june 2004, 03-06-2004, june 3rd and so on....The only way to do this (without implementing a "mind reader") is to determine in advance all the possible date formats that are possible in your input, and try to interpret each date using each of those formats until one of them passes.
    It's easy enough to handle june 3rd vs 3 june vs 3rd june, but 6/3 vs 3/6, of course, is ambiguous.

  • Passing data from an XML object to an itemRenderer

    I'm trying to color the background of a column in a datagrid and have found a sample file that illustrate the concept. However, the sample has data stored in an arrayCollection whereas mine is in an XML object. The problem is that the data in the sample file is apparently automatically passed to the itemRenderer (shown below: note the trace statement). My XML object does not appear to automatically pass data to the itemRenderer. So my questions are:
    1. Is there a simple way to pass data stored in an XML object to an itemRenderer
    or
    2. Should I convert my XML to an arrayCollection? If so, what's the best way to do this-- I've tried the following, but without success:
    <mx:Model id="xmldata" source="example3.xml"/>
      <mx:ArrayCollection id="myAC" source="{ArrayUtil.toArray(xmldata.Example1)}" />
    Here's what the xml looks like:
    <TABLE>
       <EXAMPLE1>
          <difficulty> 0.5 </difficulty>
          <discrimination> 0.7 </discrimination>
          <item> 3 </item>
       </EXAMPLE1>
    </TABLE>  
    Here's the itemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Label xmlns:mx="http://www.adobe.com/2006/mxml">
        <!--
            This item renderer simply extends Label and overrides the updateDisplayList function to
            draw a gradient-filled rectangle. The colors in the gradient are determined from the
            data.
        -->
        <mx:Script>
        <![CDATA[
            import flash.geom.Matrix;
            import flash.display.GradientType;
            import flash.display.Graphics;
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                super.updateDisplayList(unscaledWidth,unscaledHeight);
                var m:Matrix = new Matrix();
                m.createGradientBox(unscaledWidth,unscaledHeight);
                var g:Graphics = graphics;
                            trace("data.col3="+data.col3)
                var colors:Array = (data.col3 < 2000 ? [0x0000CC,0x0000FF] : [0x00CC00,0x00FF00]);
                g.clear();
                g.beginGradientFill(GradientType.LINEAR, colors, [0.2,0.6], [0,255], m);
                // the rectangle is drawn a little high and a little tall to compensate for the gap
                // the DataGrid introduces between rows.
                g.drawRect(0, -2, unscaledWidth, unscaledHeight+4 );
                g.endFill();
        ]]>
        </mx:Script>
    </mx:Label>

    This sample code should answer your question of how to bring data into the renderer automatically. It comes in via the DataGrid dataProvider and then you refer to it in the renderer as data.XYZ, where XYZ is the field in the XML with the data. See FB 3 help sys on e4x syntax.
    ------------------ mainapp.mxml --------------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="srvc.send();">
      <mx:Script>
        <![CDATA[
          import mx.rpc.events.ResultEvent;
          import mx.collections.XMLListCollection;
          [Bindable] private var xlc:XMLListCollection;
          private function dataHandler(evt:ResultEvent):void{
            xlc = new XMLListCollection(evt.result..EXAMPLE1 as XMLList);
        ]]>
      </mx:Script>
      <mx:HTTPService id="srvc" url="data2.xml" result="dataHandler(event)"
        resultFormat="e4x"/>
      <mx:DataGrid dataProvider="{xlc}">
        <mx:columns>
          <mx:DataGridColumn headerText="Difficulty" dataField="difficulty"/>
          <mx:DataGridColumn headerText="Discrimination" dataField="discrimination"/>
          <mx:DataGridColumn headerText="Item" itemRenderer="MyLabel"/>
        </mx:columns>
      </mx:DataGrid>
    </mx:Application>
    ----------- MyLabel.mxml --------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Label xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import flash.geom.Matrix;
          import flash.display.GradientType;
          import flash.display.Graphics;
          override protected function updateDisplayList(unscaledWidth:Number,
            unscaledHeight:Number):void{
            super.updateDisplayList(unscaledWidth,unscaledHeight);
            this.text = data.col3;
            var m:Matrix = new Matrix();
            m.createGradientBox(unscaledWidth,unscaledHeight);
            var g:Graphics = graphics;
            var colors:Array = (data.col3 < 2000 ? [0x0000CC,0x0000FF] : [0x00CC00,0x00FF00]);
            g.clear();
            g.beginGradientFill(GradientType.LINEAR, colors, [0.2,0.6], [0,255], m);
            g.drawRect(0, -2, unscaledWidth, unscaledHeight+4 );
            g.endFill();
        ]]>
      </mx:Script>
    </mx:Label>
    ------------ data2.xml ----------------
    <?xml version="1.0" encoding="utf8"?>
    <TABLE>
       <EXAMPLE1>
          <difficulty> 0.5 </difficulty>
          <discrimination> 0.7 </discrimination>
          <col3> 3 </col3>
       </EXAMPLE1>
    </TABLE>

  • Error while passing date parameter to the XML data definition

    Hi All,
    I have developed a BI publisher report using XML data definition & RTF template.
    This data definition contains a SQL query in it's CDATA section and runs as a concurrent program(without RDF) . We are looking to pass a date parameter to the SQL query and its not accepting the date parameter. However, when we hardcode SYSDATE in the SQL query in place of the parameter, the report runs fine. In the log file it shows that the parameter is being treated in American date style and we are using DD-MON-RRRR format. I have tried to convert the date format however still the error exists.
    What we did ?
    Created a XML data definition which contains the SQL query in its CDATA section & p_rundate (DATE) parameter.
    Registerd the XML data definition as concurrent program with EXECUTABLE= XDODTEXE and Output format as XML with p_date as a date parameter.
    Looking for any available solution for the same.
    Thanks.

    Hi All,
    I have developed a BI publisher report using XML data definition & RTF template.
    This data definition contains a SQL query in it's CDATA section and runs as a concurrent program(without RDF) . We are looking to pass a date parameter to the SQL query and its not accepting the date parameter. However, when we hardcode SYSDATE in the SQL query in place of the parameter, the report runs fine. In the log file it shows that the parameter is being treated in American date style and we are using DD-MON-RRRR format. I have tried to convert the date format however still the error exists.
    What we did ?
    Created a XML data definition which contains the SQL query in its CDATA section & p_rundate (DATE) parameter.
    Registerd the XML data definition as concurrent program with EXECUTABLE= XDODTEXE and Output format as XML with p_date as a date parameter.
    Looking for any available solution for the same.
    Thanks.

  • Date format in IDT

    Hi,
    I have an universe based on Teradata. I created a filter in IDT and it's like this :
    @Select(Sales\Calendar Day) =  @Prompt('Date:','D',,Mono,)
    When I use this filter and execute a test query in IDT, the date format is shown different in these 2:
    Enter a value : 10.Feb.2015
    Date : 10.Feb .2015 00:00:00
    I formatted the Calendar Day dimension and I can see it as 'mm/dd/yyyy' in the report result. That's fine.
    However, I want to do the same for the prompt screen in IDT too. How can I do this?
    The requirement is, I use the same filter for SAP Lumira and it does not provide a calendar component for date selection.
    So, the format of date to pass to universe is not clear.
    Thank you!

    Hi
    Try to change the format Cal day using below options, and then check the filter date format is showing as per your requirement
    predefined function TO_CHAR
    Use the custom display format option.
    Please find the below link for more info
    BI4.1 Business Layer Enhancements - Create Display Format

Maybe you are looking for

  • Oracle Application Request number informations

    Can you show me a pl/sql procedure to see all informations about a specified concurrent request, giving your request_id number ? @c:\show_request 31810589 I´d like see an Oracle Application Request number, in a line command. In Oracle Application for

  • Bdocs are in intermediate state I01

    Hi all, When I checked SMW02 transaction,some bdocs are in intermediate state I01. I tried to reproces, but it's giving shortdump. Shortdump is trying to insert table entries, already exist. Bdoc type - CND_M_SUP someone could help me how to clear th

  • Check spelling box opens outside desktop

    When I spell check an Appleworks document, the spellcheck box opens at the extreme upper edge of my desktop, and there seems to be no way to move it down. The only thing I can do is click the "cancel" box. All normal functions of spellcheck are out o

  • Problems importing files in JDeveloper 10g

    Hi, I have a project recently migrated to be developed in Oracle JDeveloper 10g (it was former developed in JDev 9), but when recompiling the project, some errors had occurred in import clauses. There are some classes that are not recursed into a pac

  • I created a semi modal jwindow?!

    I have a jframe, which calls a modal jdialog. On that jdialog I use a custom control which creates a jwindow. My problem is that when the jdialog is modal all mouse events are blocked in the created jwindow and I can't figure out why. However, if the