Using FILTER function in oracle answers

Gurus,
I have a question related to using Filter function in oracle answers.
When trying to insert a Filter (expr) Using (expr) clause in the formula area of a fact table field, It errored out with msg saying about using a wrong measure.
I know this can be done with a case expression but I tried filter clause since this is available in oracle answers.
Please help me figuring out this scenario.
Thanks.

David / Raghu - Thanks for u'r replies and apologizes for not posting question with proper material.
Am posting my code and the error message from the screen.
Code :
IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0)
Error :
nQSError: 10058] A general error has occurred. [nQSError: 22032] Function FILTER requires at least one measure attribute in its first argument. (HY000)
SQL Issued: SELECT "Dim - MBS Loan"."LOAN AMOUNT", "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK", "Dim - MBS Loan"."LOAN TYPE SEN/SUB", "Dim - MBS Project"."PROJECT NAME", "Dim - MBS Project"."PROJECT NUMBER", "Fact - MBS Loan Transactions"."AR BALANCE INTEREST", "Fact - MBS Loan Transactions"."GL BALANCE INTEREST", IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0) FROM "Financials - MBS"
OK (Ignore Error)
Please continue answering my queries. Since am a newbie your answers won't be just a reply but it's actually learning for me.
Thanks.

Similar Messages

  • How to use OUTER JOIN in Oracle Answers Filters?

    Hi, I need to have a filter on an 'Oracle Answers' report.
    The query from the NQQuery.log appears as below. (I have simplified the SELECT clause here for easy reading)
    SELECT t692.enquiry_business_route AS c1,
    t692.enquiry_id AS c11, t913.YEAR AS c12,
    t913.full_date AS c13, t666.surname AS c14,
    t666.post_code AS c15, t855.company_name AS c16,
    t983.notes AS c30
    FROM
    mkt_dw_enev_enhi_dim t983,
    mkt_dw_key_partner_dim t855,
    mkt_dw_event_type_dim t821,
    mkt_dw_customer_dim t666,
    mkt_dw_time_dim t913,
    mkt_dw_enquiry_event_fact t692
    WHERE (
    t692.enquiry_id = t983.enqu_id
    AND t666.customer_dim_key = t692.customer_dim_key
    AND t692.event_date_time_key = t913.time_dim_key
    AND TRUNC(t983.event_date)= t913.FULL_DATE
    AND t692.event_type = t821.event_type_dim_key
    AND t692.key_partner_dim_key = t855.key_partner_dim_key
    AND t821.event_type_category = 'RECEIVE_FEE'
    AND t913.YEAR = 2009
    and t692.enquiry_id = 535986
    For the following two lines I would like to have the OUTER JOIN.
    AND t692.event_type = t821.event_type_dim_key(+)
    AND t821.event_type_category(+) = 'RECEIVE_FEE' (THIS IS THE FILTER CONDITION, AT THE MOMENT IT DOESN'T WORK WITH OUTER JOIN SYMBOL)
    Please could you let me know the best way of achieving the above.
    Thanks
    Srikanth

    In the BMM layer in the join condition you will be able to specify the join to be (left, right or full outer join).
    You can even add the required table in the LTS(logical table source) and also specify a left, right or full outer join there as well.
    There is an interesting work around as mentioned in the below blog to get to the Outer join results with out changing anything in rpd but in Answers.
    http://obiee101.blogspot.com/2008/11/obiee-outerjoin-workaround.html
    Hope it helps
    Thanks
    prash

  • Bulk Replacements using Replace function in oracle 8i

    Hi All,
    Iam using oracle 8i version and i need to use Replace function for bulf replacements i mean i need to replace around 250 rows. So please anyone suggest me how to proceed
    on this request as iam using oracle 8i version.
    Thanks!
    Srini

    Write one update statement.
    The where condition is the filter what rows need to be touched.
    The SET condition will do the data change. For example it could use the REPLACE function if that is what it is needed.
    One single update statement over 20 rows would mean the task is done in BULK. 20 single updates that each handle one row would mean it is row by row = slow by slow processing.

  • Problem to  Use C function in oracle

    Hi Friends,
    i m trying to use c funciton in oracle
    as per oralce documentation its working fine when i used the demo example
    but in demo example thr are only interger data type used
    i need to use the char data type from c
    and while calling that function in c when i tried to call char as parameters data type
    its giving following error :
    SQL> CREATE OR REPLACE FUNCTION endecrypt(
    2 x Varchar2,
    3 y BINARY_INTEGER)
    4 RETURN Varchar2 AS
    5 EXTERNAL LIBRARY pass
    6 NAME "crypt" -- Name of function call. Quotes preserve lower case.
    7 LANGUAGE C
    8 PARAMETERS (x Char, y short);
    9 /
    Warning: Function created with compilation errors
    SQL> show err
    Errors for FUNCTION PRIME.ENDECRYPT:
    LINE/COL ERROR
    8/16 PLS-00235: the external type is not appropriate for the parameter
    0/0 PL/SQL: Compilation unit analysis terminated
    the bold part (x char) at line number 8 is having problem
    how can i solve it ?????

    If you had read the documentation as you claim to have done so you would know that STRING is probably what you want.
    Cheers, APC

  • How to find exception occured while using LOGON function in oracle 10g

    Hi,
    I am using LOGON function to login with a different user name in oracle 10g forms.
    LOGON ( User, Pass@tns, FALSE)
    The third parameter is passed as 'FALSE' to avoid the login screen to be opened. If any of the other parameter ( User Name, Password, TNS) is passed wrong, connection is not established but no exception is occurred. The value for 'FORM_FAILURE' is set to 'TRUE'.
    What i need is the ORA error for connection failure. The error message related to user name/password (ORA-01017) or connection identifier (ORA-12155).
    How i can get this error code if connection is failed. Is there any other way to login in oracle forms other than 'LOGON'.
    Habib

    Habib Ahmad wrote:
    Hi,
    I am using LOGON function to login with a different user name in oracle 10g forms.
    LOGON ( User, Pass@tns, FALSE)
    The third parameter is passed as 'FALSE' to avoid the login screen to be opened. If any of the other parameter ( User Name, Password, TNS) is passed wrong, connection is not established but no exception is occurred. The value for 'FORM_FAILURE' is set to 'TRUE'.
    What i need is the ORA error for connection failure. The error message related to user name/password (ORA-01017) or connection identifier (ORA-12155).
    How i can get this error code if connection is failed. Is there any other way to login in oracle forms other than 'LOGON'.As salamu alikum, Habib
    If you pass FALSE in login you can't catch anything. Want to catch the error ?
    Then change
    LOGON ( User, Pass@tns, FALSE)
    to
    LOGON ( User, Pass@tns, TRUE) Now Create On-Error trigger at form level
    and try the following code
    if error_code=01017 then
         message('invalid user name or password');
         message('invalid user name or password');
         raise form_trigger_failure;
    elsif error_code=12154 or error_code=1215 then
         message('invalid connection string');
         message('invalid connection string');
         raise form_trigger_failure;
    end if;Hopes this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • Using R function on Oracle data base

    for using R, I only can use Oracle data mining algorithms or I can use R function like social network in Oracle data base?

    Oracle Advanced Analytics provides multiple language (SQL, R and if we include GUIs, Oracle Data Miner workflow UI) support to the in-DB analytics. Using SQL, R or the ODM'r GUI, you can access a library of simple descriptive, summary and coparative statistics that have been implemented in the Oracle Database + a dozen hi-perf in-DB data mining algorithms (e.g. regression, decision trees, text mining, clustering, associations, anomaly detection, etc.) and solve a wide range of business and technical problems.
    Should you require additional techniques e.g. R CRAN packages, then Oracle Advanced Analytics supports that through R to SQL transparancy where it "pushes down" R language intentions to matching in-DB SQL functions e.g. ETL, stats and data mining OR it can make a callout to R via "embedded R mode" and have the Database manage the flow of data and the process.
    There is an OTN Discussion Forum that focuses entirely on the "R" aspects of the Oracle Advanced Analytics Option. I suggest that you re-post your questiion here R Technologies for additional discusssions and for the benefit of that Oracle Advanced Analytics/Oracle R Enterprise OTN forum/community.
    cb

  • How to use "Rank" function  in Oracle?

    I need to display Top 15 records by using rank function.
    Here is my query...I need to pull top 15 FAQ's using the below query.. How can I use RANK function to display the Top 15 FAQ"s in the list.
    Select  distinct SUb1.FAQ,Sub1.FAQ_Hits,GU.display_Name_FMLS as displayname,ev.ParentLinkrecordid,ev.userid from User GU
    Join Event ev
    ON LOWER (ev.userid) IN (LOWER (GU.lanid), LOWER (Gu.racfid))
    Join (Select distinct sm.stem as FAQ,Sum(ev.Eventresults) as FAQ_Hits,ev.ParentLinkrecordid as Topic_ID from Event ev
    Join SubjectMatter sm
    ON (TO_CHAR (sm.smrecordid) = ev.eventdetail1) AND ev.eventdetail1 IS NOT NULL AND sm.smtype = 1
    Where (Upper(ev.eventsubtype) in (Upper('FAQ'),Upper('OPENFAQ')))
    AND TO_DATE (eventdatetime, 'yyyy-mm-dd hh24:mi:ss') >= TO_DATE ('20100601', 'yyyymmdd')
    and TO_DATE (eventdatetime, 'yyyy-mm-dd hh24:mi:ss') <= TO_DATE ('20100831', 'yyyymmdd')
    Group by sm.stem,ev.Parentlinkrecordid
    order by FAQ )sub1
    ON Sub1.Topic_ID = ev.ParentLinkrecordid)

    A few bits that I noticed in the query ...
    in (Upper('FAQ'),Upper('OPENFAQ'))1) Do you really a upper for a string which is already in upper case.
    Select distinct sm.stem as FAQ,Sum(ev.Eventresults) as FAQ_Hits,ev.ParentLinkrecordid as Topic_ID2) Do you need a distinct when you are using a GROUP function viz. SUM ?
    You rank query is as follows, I am not very good at the ANSI style JOIN so changed it slightly ... :-)
    Also notice the usage rank function in the "sub1" query.
    select distinct sub1.faq,
                    sub1.faq_hits,
                    gu.display_name_fmls as displayname,
                    ev.parentlinkrecordid,
                    ev.userid
    from user gu, event ev,
      (select rank() over (order by sum(ev.eventresults) desc) rnk,
              sum(ev.eventresults) as faq_hits,
              sm.stem as faq,         
              ev.parentlinkrecordid as topic_id
         from event ev, subjectmatter sm
        where (to_char(sm.smrecordid) = ev.eventdetail1)
          and ev.eventdetail1 is not null
          and sm.smtype = 1
          AND upper(ev.eventsubtype) in ('FAQ', 'OPENFAQ')
          and to_date(eventdatetime, 'yyyy-mm-dd hh24:mi:ss') >= to_date('20100601', 'yyyymmdd')
          and to_date(eventdatetime, 'yyyy-mm-dd hh24:mi:ss') <= to_date('20100831', 'yyyymmdd')
        group by sm.stem, ev.parentlinkrecordid
        order by faq) sub1
    where lower(ev.userid) in (lower(gu.lanid), lower(gu.racfid))
      and sub1.topic_id = ev.parentlinkrecordid)
      and sub1.rnk <= 15;Like mentioned above, some sample data would have helped.

  • Using SYS_EXTRACT_UTC function in Oracle forms version 9

    Hi,
    I would like to use the function SYS_EXTRACT_UTC in forms but I get an error 201:
    identifier 'SYS_EXTRACT_UTC' must be declared.
    How can I use this function? do I need any library or something?
    Thanks

    You can try creating a wrapper database procedure for this and call the procedure
    from forms. It should work
    Rajesh

  • How to use groupby function in OBIEE ANSWERS ???

    Hi ,
    I need to find TOP 1000 client names on each product and I need to group the data by product. I am unable to group the data in Answers , I dont have access to the repository.
    I used the Top function but unable to group the data. Please help me...

    Why didn't using TOP work for you? What kind of results did you get?
    I can also suggest using custom ColumnCount with RSUM () in it, applying filter RSUM()<=1000, and sorting by product amount DESC
    and definitely your column order should be something like this - product group, client, product_amt, rowcount (you can actually remove this once you create filter for it)

  • How to use decode function in oracle apex 3.2.1

    Hello Friends,
    how to use decode
    var_decode := 'decode'||'('|| var1 ||','|| -800000000000000||','||'.A'||','||
    appreciate your help.
    regards/kumar
    Edited by: kumar73 on Apr 23, 2010 12:25 PM
    Edited by: kumar73 on Apr 23, 2010 12:27 PM

    Hey just on this particular point, there's a handy PL/SQL method for escaping quotation characters which may reduce the complexity of the string.
    For example, if I had a string:
    I can't understand why quoting my 'quote' characters never seems to "work"!and I wanted to pass that into a variable, I could do this:
    vc_foo:= 'I can''t understand why my ''quote'' characters never seems to "work"!';or I could use the q function, whereby you enclose your string within a quote delimiter of your choice, like so:
    vc_foo:= q'^I can't understand why quoting my 'quote' characters never seems to "work"!^';
    note: I used the caret (^) character by convention but any valid character will do
    ...all of which leaves your original string more or less unadulterated.
    I find this particularly useful for generating dynamic SQL and dynamic PL/SQL, as it leave the query looking a tad more readable, although if you are chaining together multiple strings with double-pipes, it can make it a little muddier. I find it particularly useful if I'm going to deal with string data from, for example, a field with Irish-derived surnames such as "O'Reilly"...
    Give it a go!

  • How do we use "streams" functionality in Oracle 8i?

    Hello Gurus,
    Oracle Streams is only available as of Oracle 9i. I need to replicate data from an Oracle 8i database to another database. The tables don't match exactly and i want a solution that can mimic streams. How can that be done? Is there any sample code available to do this type of streaming between Oracle 8i dbs?
    Thanks.

    You can use Materialized views (used to be called Snapshot) or Advanced Replication. But I think AR is an extra option not included in Enterprise Edition.
    You could also develop trigger based replication using database link. But I advice you don't go that way. Don't reinvent the wheel. Think of what happens when one db goes down - you don't want the other to sink with it...
    You should give Snapshot a try. Look for fast snapshot refresh. It uses incremental log, so it is a lot faster in most cases.
    You need at least 9i R2 to use Streams, but you're better off with 10.2.0.3.

  • Using Sum Function in Oracle(on 24 th)

    Hi all i wrote the following query.
    SELECT RESPONSER_ID,SUM(SUM(DISTINCT WORK_SPACE)) AS SCORE,COUNT(DISTINCT QUESTION_ID) AS QCOUNT FROM TQDB_LEARNER_RESPONSE WHERE RESPONSER_ID=328
    GROUP BY RESPONSER_ID
    I am getting the following error.
    ORA-00937: not a single-group group function
    Any body Pls help me.

    why use sum(sum()
    SUM(SUM(DISTINCT WORK_SPACE)) AS SCORE,
    SELECT
         RESPONSER_ID,
         SUM(DISTINCT WORK_SPACE) AS SCORE,
         COUNT(DISTINCT QUESTION_ID) AS QCOUNT
    FROM
         TQDB_LEARNER_RESPONSE
    WHERE
         RESPONSER_ID=328
    GROUP BY
         RESPONSER_ID Regards
    Singh

  • How I can use use_exit function in oracle forms

    Hi,
    I will appreacite if Somebody can help me , how I can configure the user_exit function for our Oracle Forms 10g development environment (Windows 32 ).
    With regards
    Satheesh Kumar

    hi,
    in order to find out the user exits for any tcode,
    1. get the developement class of the tcode from SE93.
    2. Now goto transaction SMOD and press F4,
    3. give in the Deve class in the dev class and Press ENTER
    this will show u the exits for any tcode.
    or execute this report
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    Regards
    Anver

  • Webaccess hangs when using filter function (upper right)

    On different systems i experience that when i use strings to search for in the upper right search filter the webaccess simply sais "loading" and nothing else happens.
    somebody else seen this or am i doing something wrong?
    mit freundlichen Grüßen
    Gertfried Zobel
    Augraben 72a
    90475 Nürnberg
    tel. +49 911 534314

    Further to this issue, it only seems to affect the particular user/session. I can log on using a different browser, any user and it's still working.
    catalina.out displays the following. Not sure if it's related.
    Code:
    Exception in thread "Poll-Worker-1" Missing session string[59920]
    at com.novell.webaccess.providers.soap.GWPortTypeFacade.xlatError(GWPortTypeFacade.java:148)
    at com.novell.webaccess.providers.soap.GWPortTypeFacade.pollRequest(GWPortTypeFacade.java:3969)
    at com.novell.webaccess.providers.soap.utils.SOAPUtils.pollRequest(SOAPUtils.java:1866)
    at com.novell.webaccess.providers.soap.SOAP.handleSlap(SOAP.java:1000)
    at com.novell.webaccess.providers.soap.SOAPSlap.run(SOAPSlap.java:87)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:906)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:929)
    at java.lang.Thread.run(Thread.java:761)
    If you leave it to fail, you get the error message
    Code:
    Your request could not be processed due to a connection failure with the server.
    Contact your Administrator if the problem persists after re-login.
    Regards
    Eric.

  • How to use DLL function in Oracle Forms 5.0?

    for instance, the FindWindowA function in "user32.dll"
    please advise, thanks

    Take a look at ORA_FFI package.

Maybe you are looking for