DAYOFMONTH function in obiee

Hi,
I have been trying to extract day of month,
DAYOFMONTH('03/03/2011'), this throws error saying
*nQSError: 10058] A general error has occurred. [nQSError: 22025] Function Calendar Extract is called with an incompatible type*
when i try DAYOFMONTH(CURRENT_DATE), the function is working fine, can anyone help me what date format does DAYOFMONTH expect as input parameter and how should i rephrase DAYOFMONTH('03/03/2011'), I also tried:
1. DAYOFMONTH(CAST('03/03/2011' AS DATE))
2. DAYOFMONTH(EVALUATE('TO_DATE(%1,%2)', '03/03/1999','DD/MM/YYYY'))
Thanks,
Sreekanth.

It's not problem with DayofMonth Fuction its about what format is specified in your config file-- NQSConfig.ini.
What ever the format is defined there you have to use that.
or better use evaluate function to work play around any format.
Cheers,
Rajeev A

Similar Messages

  • Applying decode function in obiee 11g

    DECODE(A.AC_CCY,'INR',DECODE(DRCR_IND,'D',-1,1)*A.LCY_AMOUNT,DECODE(DRCR_IND,'D',-1,1)*A.FCY_AMOUNT),
    DECODE(DRCR_IND,'D',-1,1)*A.LCY_AMOUNT,
    Can any one help me how to decode the above sql statement in obiee 11g.
    Edited by: 925104 on Apr 3, 2012 12:48 AM

    you can achieve it by using CASE WHEN condition END function in obiee. nested case also supported by obiee.
    check the below link Decode Join  Condition in OBIEE RPD
    Thanks
    Jay.
    Edited by: Jay on Apr 3, 2012 12:56 PM

  • Converting Decode function in OBIEE

    Hi Guru's
    we are converting some BO reports to OBIEE and need to convert Decode function
    Below is the Decode function they are using:
    Decode ( sign(nvl(BOOKINGS_DATA_UDTC.qty_shipped,0)), 0,decode(BOOKINGS_DATA_UDTC.DELIVERY_NUMBER, 0,decode(BOOKINGS_DATA_UDTC.Schd_Ship_date_fk,to_date('1/1/1990','mm/dd/yyyy'),'Next Month Backlog',decode(sign(nvl(BOOKINGS_DATA_UDTC.Schd_Ship_date_fk, '01-JAN-90') -PAR.PAR_DATE), 1, 'Next Month Backlog', 'Current month will ship')) ,'Awaiting for collection') ,'MTD Shipped')
    i have tried converting into case :
    case when sign(IFNULL("BOOKINGS_DATA_UDTC"."Qty Shipped",0)) = 0 then (case when "BOOKINGS_DATA_UDTC"."Delivery Number" = 0 then (case when "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" = '01-JAN-1990' then 'Next Month Backlog' else (case when Timestampdiff(SQL_TSI_DAY, cast('@{ParDate}{28-DEC-2012}' as Date),(case when "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" IS NULL then CAst('01-JAN-1990' as DATE) else "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" end)) > 1 then 'Next Month Backlog' else 'Current Month Will Ship' end) end) else 'Awaiting For Collection' end) else 'MTD Shipped' end
    But it is not workign as expected.
    Can some one please help me with this.
    Thanks,

    you can achieve it by using CASE WHEN condition END function in obiee. nested case also supported by obiee.
    check the below link Decode Join  Condition in OBIEE RPD
    Thanks
    Jay.
    Edited by: Jay on Apr 3, 2012 12:56 PM

  • How to use Table valued MSSQL  function in OBIEE

    Hi all,
    Can some one help me to understand how to use table valued function in OBIEE? I want to use a table valued function (MSSQL function, with some input parameter), in the physical layer to pull the data?
    I know for MSSQL Stored Procedure we can write as
    EXEC SP_NAME @Parameter = 'VLUEOF(NQ_SESSION.Variablename)'
    but now I have a table valued function in the query window I can get the data as
    select * from myfunction(parametervalue)
    In physical layer of OBIEE I have tried as
    select * from myfunction('VLUEOF(NQ_SESSION.Variablename)'), but I'm getting error as the NQ_SESSION variable doesn't have a value , but actually I have initialized the variable but still Im getting error.
    Can some one help me to solve this.
    Thanks,
    Mithun

    Follow this link and try yourself. let me know for issues
    Substring instr issue in obiee
    Appreciate if you mark
    Edited by: Srini VEERAVALLI on Feb 20, 2013 8:13 AM

  • Issues with integrating Java script functions in OBIEE 11G

    Hello experts..
    I am trying to integrate some Javascript functions in my OBIEE 11G Dashboard..
    I have modified the original common.js file and renamed it as insight_common.js in the following directory (backed up the original file of course)
    OBIEE 11G Folder/user_projects/domains/bifoundation_domain/servers/bi_server1/tmp/_WL_user/analytics_11.1.1/7dezjl/war/res/b_mozilla/insight_common.js
    In my dashboard, I have a dashboard object as text component where I have checked 'Contains HTML Markup'. I have written the following code:
    hello
    <script src="/res/b_mozilla/insight_common.js" type="text/javascript"></script>
    <script type="text/javascript">
    sayHi();
    </script>
    However, when I launch the dashboard, it is not working.
    In the Google Chrome browser as I inspected the element to investigate the reason, I am getting the following error under 'console'
    Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/res/b_mozilla/insight_common.js
    Uncaught ReferenceError: sayHi is not defined saw.dll:611
    It seems that OBIEE is not recognizing the new file that I made..
    Is there a way around this?
    Thanks

    Srini
    I don't have backgrounds in coding, so a lot of what I wrote came from my own researching...
    Now I have tried your latest suggestions again as the below:
    1.<script type="text/javascript" src="res/b_mozilla/insight_common.js">
    sayHi();
    </script>
    and
    2.
    <script type="text/javascript" src="res/test.js"></script> ----- in my case: <script type="text/javascript" src="res/b_mozilla/is_common,js"></script>
    Now both codes this time do not yield any outputs when launching the dashboard. The section is blank and the preview of the Text section in the dashboard is blank as well..
    So, are you sure these are all the steps I need to take to call javascript function in OBIEE?
    Do I need to define anything in weblogic or other places?
    I hope I am not missing any steps..
    Thanks and let me know..

  • Evaluate function in OBIEE

    Hi All,
    I tried using Evaluate and Evaluate_Aggr in the column formula of a report.
    Evaluate_Aggr() is erroring saying the dimension Work Order is incorrectlly defines logical Table Source Mapping for a dimension of Work Order. If I revoke the implicit fact coniguration on this Subject Area which I have, the report executes as expected. But this implicit configuration is required in my scenario for other reports to work.
    Using Evaluate() works perfectly.
    Can anyone help me in fixing this?
    Shld I add any other configuration in the RPD to resolve this issue?
    Thanks

    996933 wrote:
    hi all
    i got this error when i try to execute evaluate function in obiee answer
    nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT DGN_TIME_RES_USAGE_CUBE.DRTCLN_WO_NO, DGN_TIME_RES_USAGE_CUBE.HOURS, DGN_TIME_RES_USAGE_CUBE.PROJ_NO, EVALUATE('FUNC_FIND_EMPLOYEE_DESC(%1,%2,%3)','KASA',DGN_TIME_RES_USAGE_CUBE.DRTCHD_EMP_ID,1), RMAX(DGN_TIME_RES_USAGE_CUBE.DRTCHD_DATE), RMIN(DGN_TIME_RES_USAGE_CUBE.DRTCHD_DATE) FROM LIVE2 years back post from the next time open new thread ? (Business Intelligence Suite Enterprise Edition )
    Thanks,
    Saichand

  • Use EVALUATE function in obiee

    Hi ALL
    i hv a database query like this;
    select
    deptno,
    rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enamesfrom
    emp
    group by
    deptno;
    now, i want to use this using Evaluate function in obiee column formula.
    thn how to do it.
    Please reply.
    THX
    SAP

    Hello SAP,
    I have seen you for sometime and one thing I came to know is you are creating threads and once you got your solution or you dont feel to follow up you are just leaving the thread.
    see few here,
    Sorting month name
    Drill down problem
    Re: Filter in Union Request
    so please better close the threads which are answered and proceed further.

  • Dense Lookup Function in OBIEE

    Hi ,
    Can someone please explain the syntax of Dense Lookup Function in OBIEE.
    The function in the built-in RPD is using too many arguments and I am not able to understand it.
    Thanks in Advance for the help.
    Akshatha

    I had actually seen all those links. Thanks for your time although.
    Actually, I have an expression like this.
    lookup( DENSE LookupTable.DOMAIN_MEMBER_NAME, 'MCAT', 'CMP' || '~' || Table_A.TOP_LVL_PRODCAT_ID, VALUEOF(NQ_SESSION.USER_LANGUAGE_CODE), Table_A.DATASOURCE_NUM_ID)
    I am not sure of what 'MCAT' and 'CMP' is here?
    Is the || the concatenation operator?
    Can you please explain this expression?
    I hope I am not asking too much here :/
    Akshatha

  • How to use CHOOSE function in OBIEE

    Hi,
    Could any one help me out in using the choose function in OBIEE.
    How can a column be restricted using the choose function, when different users belonging to different groups logs in.
    Rakesh

    It seems be obvious that you should not publish reports to users and groups who are not allowed to see the columns in the report,
    but in practice it can be very challenging to oversee this, especially when you have a lot of groups and a very strict security model....or "unsurmountable" and unchangeable "business requirements" ;-)
    Testing definitely is the crucial point. And when you start going nuts with column access rights plus column selectors, dynamic view switching, guided nav., dynamic column formulae etc. etc. the fun really begins.

  • Unable to use WriteBack function in OBIEE on a Unix setup

    Hi All
    I am trying to implement the writeBack function in OBIEE. We have OBIEE installed on a Unix machine. Below is the xml that I have writte, it keeps erroring stating that the xml file cannot be read.
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawnm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="forecast">
    <XML>
    <writeBack connectionPool="MOM_BI">
    <Insert></Insert>
    <Update>UPDATE STORE SET STORE_NAME='{@c1}' WHERE STORE={@c0}</Update>
    <postUpdate>COMMIT</postUpdate>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Below is the log that I've received from OBIEE:
    Error loading XML Message File (/app/oracle/product/OBIEE10133/OracleBI/web/msgdb/CustomMessages/forecast.xml): Sax parser returned an exception.
    Message: Invalid document structure, Entity publicId: /app/oracle/product/OBIEE10133/OracleBI/web/msgdb/CustomMessages/forecast.xml, Entity systemId: , Line number: 2, Column number: 1^M
    Error Codes: UH6MBRBC^M
    Could you please let me know what is wrong with my xml file? By the way I only want to do an update to my table. Also I have followed all the examples from Venkat and others but I stil cannot get it to work.
    Regards
    Adnan

    It's already good to know that the file gets picked up.
    What I don't understand: "The log files are not being updated with the error however when I re-save my Answer it is populating the log file to state that the object already existed."?
    I had to put a fake "insert" statement to get it working once. Here's the example:
    <?xml version="1.0" encoding="utf-8"?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="ELT_Upside">
    <XML>
    <writeBack connectionPool="ELT_Writeback_Pool">
    <update> UPDATE T_DW_LOGIC_ELT_UPSIDE SET COMMENTS='@{c0}', AMOUNT=@{c1}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where UPSIDE_COMMENT_ID=@{c2} </update>
    <insert> UPDATE T_DW_LOGIC_ELT_UPSIDE SET COMMENTS='@{c0}', AMOUNT=@{c1}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where UPSIDE_COMMENT_ID=@{c2} </insert>
    </writeBack>
    </XML>
    </WebMessage>
    <WebMessage name="ELT_Downside">
    <XML>
    <writeBack connectionPool="ELT_Writeback_Pool">
    <update> UPDATE T_DW_LOGIC_ELT_DOWNSIDE SET COMMENTS='@{c0}', AMOUNT=@{c1}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where DOWNSIDE_COMMENT_ID=@{c2} </update>
    <insert> UPDATE T_DW_LOGIC_ELT_DOWNSIDE SET COMMENTS='@{c0}', AMOUNT=@{c1}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where DOWNSIDE_COMMENT_ID=@{c2} </insert>
    </writeBack>
    </XML>
    </WebMessage>
    <WebMessage name="ELT_Outlook">
    <XML>
    <writeBack connectionPool="ELT_Writeback_Pool">
    <update> UPDATE T_DW_LOGIC_ELT_OUTLOOK SET AMOUNT=@{c4}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where OUTLOOK_COMMENT_ID=@{c0} </update>
    <insert> UPDATE T_DW_LOGIC_ELT_OUTLOOK SET AMOUNT=@{c4}, LAST_UPDATED_BY='@{c6}', LAST_UPDATE_DATE=TO_TIMESTAMP('@{c7}', 'YYYY-MM-DD HH24:MI:SS.FF3') where OUTLOOK_COMMENT_ID=@{c0} </insert>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Cheers,
    C.

  • About the filter function in OBIEE 11g

    Hi, all.
    when i use the filter function in OBIEE 11g, it turn out a wrong result.
    The operation steps and detail are described as follow:
    1. In the Column Formula pane, I typed the Formula of the column 'count of customer' as:
    FILTER(count(distinct("customer info dimesion"."customerID")) USING ("TradeType Dimesion"."TradeType" = '001'))
    2. But the phisical SQL about this column in the NQquery file is that: "count(distinct(T11520.CUSTOMERID)) as c5, "
    which means that, the filter wasn't applied, right?
    If so, what shall I do in this situation, in other words , how can i make a Condition COUNT?
    Any Suggestion is appreciated!
    Thank you in advance~~O(∩_∩)O~

    Hi katherine,
    FILTER(count(distinct("customer info dimesion"."customerID")) USING ("TradeType Dimesion"."TradeType" = '001'))I think your formula there is mistake like many braces...instead type this in your f(x)
    =>Filter(count(distinct customer_id) USING trade type='001')
    This filter function is same like a case statement,if you filter still gives error write a case statement
    CASE WHEN TradeType Dimesion.TradeType='001' THEN count(distinct customer info dimesion.customerID) ELSE 0 END
    Will it be helpful?,follow this etiquette http://forums.oracle.com/forums/ann.jspa?annID=939
    By,
    KK

  • Percentile_Disc Function in OBIEE 10g - Help needed at the earliest

    Hi All,
    I have a requirement of using PERCENTILE_DISC function in OBIEE 10g repository. I tried NTile function, to fetch the percentile. But that is not what am intending to see.
    I have a requirement something similar to this, to be implemented in repository. Could anyone throw some light in this regard?
    PERCENTILE_DISC(.25) WITHIN GROUP (ORDER BY F.Days asc) OVER (PARTITION BY A.NAME, B.PLACE)
    Here F = Fact
    A = 1st Dimension
    B = 2nd Dimension
    Days = Is calculated as TIMESTAMPDIFF(SQL_TSI_DAY, A.DATE, B.DATE). Established Inner Join, to fetch this calculation in to the FACT
    Appreciate your responses at the earliest. Thanks once again.
    Regards,
    Sarat Nallapati

    Hi,
    I don't have any idea on percentile_disc.
    But,in OBIEE we have a function PERCENTILE()
    It will give the percentage of each value in the total sum of all the values.
    once check it.
    Regards,
    Lakshmipathi.

  • Urgent - INSTR() Functions in OBIEE?

    Hi All,
    I just got some very good help from the DB experts on these forums about solving a problem with a table join that I had.
    But now I have this SQL query and I'm trying to figure out how to implement this in OBIEE:
    select *
    from TABLE1,TABLE2
    where instr(TABLE2.USER_ID,TABLE1.USER_ID) > 0
    My question is how do I implement this instr() function on OBIEE? I checked physical and business model mapping layers in the repository and it does not allow me to configure this type of join. Is it possible to configure this type of join function to be invoked automatically everytime a user runs a certain query in OBIEE (as if it was a natural join)?
    Any help would be greatly appreciated.
    Alan

    Hi,
    You can refer the below links,
    Substring instr issue in obiee
    extract a string from a string
    http://108obiee.blogspot.in/2009_10_01_archive.html
    Award points it is useful.
    Thanks,
    satya

  • Functions in OBIEE

    Hello,
    I have a function in Discoverer. This function returns a value and I need to implement the same in OBIEE.
    Can anybody please tell me how to use functions in OBIEE?

    I have a function that concatenates after calculating certain measures into one string.That still isn't a very precise explanation of what you're actually trying to achieve, but here's what I think you're talking about in a SampleApp:
    <saw:report xmlns:saw="com.siebel.analytics.web/report/v1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlVersion="201201160" xmlns:sawx="com.siebel.analytics.web/expression/v1.1">
       <saw:criteria xsi:type="saw:simpleCriteria" subjectArea="&quot;A - Sample Sales&quot;">
          <saw:columns>
             <saw:column xsi:type="saw:regularColumn" columnID="c34249c052e5dee1c">
                <saw:columnFormula>
                   <sawx:expr xsi:type="sawx:sqlExpression">'Total Revenue = ' || cast(sum("Base Facts"."1- Revenue" by) as varchar(50)) || ' and Revenue by Brand = ' || cast(sum("Base Facts"."1- Revenue" by "Products"."P4  Brand") as varchar(50))</sawx:expr></saw:columnFormula>
                <saw:tableHeading>
                   <saw:caption fmt="text">
                      <saw:text>temp</saw:text></saw:caption></saw:tableHeading>
                <saw:columnHeading>
                   <saw:caption fmt="text">
                      <saw:text>temp</saw:text></saw:caption></saw:columnHeading></saw:column>
             <saw:column xsi:type="saw:regularColumn" columnID="c6eefeb886be32732">
                <saw:columnFormula>
                   <sawx:expr xsi:type="sawx:sqlExpression">"Products"."P4  Brand"</sawx:expr></saw:columnFormula></saw:column></saw:columns></saw:criteria>
       <saw:views currentView="0">
          <saw:view xsi:type="saw:compoundView" name="compoundView!1">
             <saw:cvTable>
                <saw:cvRow>
                   <saw:cvCell viewName="titleView!1">
                      <saw:displayFormat>
                         <saw:formatSpec/></saw:displayFormat></saw:cvCell></saw:cvRow>
                <saw:cvRow>
                   <saw:cvCell viewName="tableView!1">
                      <saw:displayFormat>
                         <saw:formatSpec/></saw:displayFormat></saw:cvCell></saw:cvRow></saw:cvTable></saw:view>
          <saw:view xsi:type="saw:titleView" name="titleView!1"/>
          <saw:view xsi:type="saw:tableView" name="tableView!1">
             <saw:edges>
                <saw:edge axis="page" showColumnHeader="true"/>
                <saw:edge axis="section"/>
                <saw:edge axis="row" showColumnHeader="true">
                   <saw:edgeLayers>
                      <saw:edgeLayer type="column" columnID="c34249c052e5dee1c"/>
                      <saw:edgeLayer type="column" columnID="c6eefeb886be32732"/></saw:edgeLayers></saw:edge>
                <saw:edge axis="column"/></saw:edges></saw:view></saw:views></saw:report>

  • Usage of TAble Functions in OBIEE

    Hello All,
    I have created a table function in the database.
    Is it possible to use/call table functions in obiee.Please let me know how to use table functions in OBIEE.
    Thanks in advance.

    Hi,
    Thanks for your reply.
    I want to use this table function to generate answers report.
    In the query i am using unions,bind variables.I can not create a database view on this query.The best solution would be creating a table function.
    But,i do not know how to access/use/call this table function to create answers report.
    Thanks in advance.

Maybe you are looking for

  • HT1386 How to get Wi-Fi syncing on my Ipod Touch 4G

    My Ipod can no longer be found on my computer that has Itunes installed on it. I talked to a professional and he said it's a major problem with my computer software that needs repairs, which I have no money for. I have another computer that can sync

  • My apple tv will no longer sync movies

    I have rented and purchased new content from the iTunes store and when I try and sync them to my apple tv I get an error that they are not supported formats. I have reset the apple tv and computer... It will sync audio and photos... but any tv shows

  • Report Painter Library: troubles with new field in the additional structure

    Hi, ALL! I'm  creating a new field in the Report Painter table  GLFUNCT. Do do it I created my field in the additional structure GLDBZ  for GLFUNCT and create an row in the T804C table for new field. Who has expirience in customizing using T804* tabl

  • Images not showing up in Spry Data Set

    I'm hoping someone can help an amateur. I'm trying to use an xml file to display with Spry (Stacked containers with Spotlight, specifically). It a simple parts list, where there would be an image next to a stacked description/part#. The data shows up

  • Safari will not download most files

    The only thing I can download are Apple updates: Not 3rd party application updates, not Firefox, not efax attachment files. I am considering reinstalling Safari from the CD and/or trying to download the OS X 10.4.8 Intel update. Should I? Any suggest