Convert WHERE condition to OBIEE using available OBIEE function

I have this WHERE condition which has to be attached to a Logical Table Source (Content Tab). This condition exists in my BO Universe and has to be applied to my OBIEE project.
TRUNC(SYSDATE) >= NVL(QP.QP_LIST_LINES.start_date_active, TRUNC(SYSDATE))
AND TRUNC(SYSDATE) < NVL(QP.QP_LIST_LINES.end_date_active,TRUNC(SYSDATE)+1)
Using the functions in OBIEE, I ended up with this WHERE condition but seems not to work because when I compared the results, they are different.
CURRENT_DATE >= IFNULL(ABCDE."Price List Lines"."Item Start Date", CURRENT_DATE ) AND CURRENT_DATE < IFNULL(ABCDE."Price List Lines"."Item End Date", CURRENT_DATE + 1)
Please help me correct this.
Thank you in advance.
Message was edited by:
user595459

Hi, The TIMESTAMPADD function helped. I will take note of this. It's now working but noticed the performance (generating the report) is taking a long time. Would appreciate your advice. Thanks.

Similar Messages

  • WHERE condition in OBIEE 11g

    HI gurus,
                    How can I use a WHERE condition in obiee 11g in the Column formula or in the BMM layer in the repository .
    Thanks in advance
    Reg,
    Niv

    Hi,
    In the Column formula, the functions like Case When clause (Category: Expressions) can always be used in the building the expression.
    For the above, there is always two options
    1. Derived from Physical Mappings - this will list only the physical tables that are pulled into the LTS of the logical table
    2. Derived from existing columns using an expression - this will list all the Logical tables in the RPD
    If you want to apply the filter i.e where clause on the entire table, then go to Content Tab of the LTS
    Enter your WHERE clause filters in the section - Use this "WHERE clause".....
    The above modifications will apply where clause on all the columns
    Please mark if it is helpful
    Srikanth

  • How to use "where" condition when we use update or delete in a dbadapter?

    Hi
    I want to update/delete a record in a database table based on one of its fields. Which means I have to use "where" condition to check the value of the field and only then I can decide whether or not the record can be updated/deleted.
    When I try to use the dbadapter update/delete options, I dont see any provision for writing the "where" condition.(May be I am missing something).
    I know that I can use the custom sql option and write an sql command to achieve this.
    But I would like to know if this can be done when using the update/delete option itself in the dbadapter.
    Thanks in anticipation.
    Ravi

    Hi,
    You can use the logical delete option. In that case you can supply a value for the column that indicates if a record is changed and have it picked up by the db adapter.
    Andre

  • Any scenario where the Condition Contracts are used?

    HI I am new to this forum. I have been through the defn of the Condition Contracts but still am not able to understand . Please throw some light on the same with some example.

    The condition contract is a document with which you can record conditions that a partner e.g a vendor grants to a set of eligible partners e.g customers.
    A condition contract consists of 3 components: 1. Condition contract header which contains info. regarding owner of the condition contract, a validity interval, the document status, currency information, exchange rate, terms of payment  etc.             2. List of eligible partners containing the customers or vendors who are entitled to use the condition contract             3.  Conditions i.e. the condition records
    TYPICAL SCENARIO WHERE CONDITION CONTRACTS ARE USED:
    Suppose a pharmaceutical company grants discounts and special prices to a group of hospitals for a range of medicines. A wholesaler must grant these special conditions whenever one of these hospitals places and order. Since the wholesaler has obtained the medicines from the manufacturer at the standard price, the manufacturer must refund part of the purchase price to the wholesaler if the latter has sold them at special conditions. In order to secure these special conditions, the wholesaler employs the condition contract. At header level, the pharmaceutical company is specified as the owner/vendor. Information relevant for settlement such as terms of payment, purchasing organization, settlement currency and exchange rates are also saved in the contract header. The eligible hospitals are either listed separately within the contract or are defined as an eligible partner list externally and included as a list. The special prices and/or discounts are defined in the conditions area of the condition contract. The period of time for which the agreement is valid is defined in the condition contract validity interval. If the special conditions are dependent solely on the type of medicine, you can use condition table A163. This contains, besides the condition contract number, only the material in the access. A release step can follow the document entry, since the conditions are available only after the condition contract is released. Then the special conditions are found in pricing for the sales order and the sales invoice if an eligible hospital has ordered one of the specified medicines.
    Kirti hope this answers your question to some extent.
    regards
    PARAM

  • Dynamic where condition

    Hi, I'm building a procedure with 4 parameters το pass in input and I ask if it's possible to build a select inside the procedure with a dynamic where condition.
    The query with 2 conditions is the following:
    SELECT count(incident_number) FROM cs.cs_incidents_all_b
    1st condition
    WHERE (TO_DATE(incident_attribute_6,'dd-mm-yyyy hh24:mi') BETWEEN TO_DATE(p_create_date_ll,'dd-mm-yyyy hh24:mi') AND TO_DATE(p_create_date_ul,'dd-mm-yyyy hh24:mi'))
    2nd condition
    AND external_attribute_4 BETWEEN p_resolv_time_ll AND p_resolv_time_ul;
    The first condition has to be always valid, but the second one, depending on the parameters has to be satisfied or not.
    The first 2 parameters (p_create_date_ll and p_create_date_ul) are always written as a string (so the first condition always works).
    The second pair of paramenters (p_resolv_time_ll and p_resolv_time_ul) can be written as numbers (from a form), or written both as '*'
    So, If the parameters p_resolv_time_ll and p_resolv_time_ul are numbers, I should retrieve a small set of data (all the 2 where condition have to work),
    while if they are both '*' ONLY the first condition has to work. Practically, in this last case the 2nd condition is how it was commented.
    Is it possible to build something that satisfy my request ?
    Thanks in advance
    Alex

    Yes I know....
    If I use an IF THEN ELSE statement I can write 2 different queries with 2 different where conditions....but I want to avoid this solution because I have 4 pair of these parameters which can assume differents values and depending on their values I have to use different where conditions
    If I use an IF THEN ELSE statement, this means to write 16 different queries....
    I already used DECODE or CASE but they not satisfy my request....
    Anybody has others ideas ?
    Thanks

  • Where condition on date column using OleDb Command?

    Hi,
    How to read date column from excel sheet usign OleDb command. Below code failing .
    OleDbCommand cmd = new OleDbCommand("SELECT Column1 FROM [sheet1$] WHERE createdDate < ="+Convert.ToDateTime("3/24/2015")+" ", connection);
    OleDbDataReader dr = cmd.ExecuteReader();
    Syntax error (missing operator) in query expression 'LastRun < =3/24/2015 12:00:00 AM'.
    How to write a where condition on date column excel sheet?
    Thanks
    PS.Shakeer Hussain

    Hi PS.Shakeer Hussain,
    In Excel, we store these data in excel is string type.  Based on your code, it is dataTime type. So if fails when compare with dataTime and string.
    Please try the following code, Useing DateTime.ToOADate Method to convert to the equivalent OLE Automation date. It works fine on my side.
    OleDbDataAdapter dbAdapter = new OleDbDataAdapter("select * from [Sheet1$] WHERE createdDate < "+DateTime.Parse("3/29/2015").ToOADate(), connExcel);
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Convert crystal reports to OBIEE?

    Does anyone know of a tool that will convert crystal reports to OBIEE or how difficult it is?

    There is no tool as both products are from different vendors. You need to manual conversion, mean get the requirements noted form crystal reports and build them in OBIEE from scratch. Using BI PUblisher is recommended,as most of the crystal reports uses custom sql.

  • Converting MDX queries to OBIEE 11g

    How can I convert MDX queries to OBIEE queries. Im migrating Hyperion/Brio reports to OBIEE 11g reports.

    You can always plug in your cubes as datasources into OBIEE and then create the analyses using Answers.
    A direct MDX-to-"OBIEE" path only exist if you copy your MDX queries and paste them into a direct database request which uses a conncetion pool pointing towards your cube. That said...you will miss out on a lot of vanilla functionality if you do this.
    Cheers,
    C.

  • How to handle DECIMAL MySQL datatype converted to DOUBLE in OBIEE 10gR3?

    Dear all,
    I have a problem in OBIEE 10g namely I use MySQL database as direct datasource to OBI server and I have a column in a table in MySQL which was designed as DECIMAL datatype (18,0).
    This column is used for measuring a duration, and the values are figured in seconds (without decimals), in form like:
    '1200'
    in MySQL database.
    After import the related MySQL table to OBI repository, the OBIEE converts the column in DECIMAL datatype to DOUBLE PRECISION datatype automatically.
    My object is to achieve values in such form, certainly in duration sense (not in time !):
    hh mm ss
    In order to accomplish it I've tried to change the column format with function ROUND:
    ROUND(db.table.column / *3600*, 2)
    The problem is that it works well only if the values can be divided with no remainder e.g.
    original value: 7200
    new value (ROUND): 2
    In case of my example:
    original value: 1200
    new value (ROUND): 0
    This is wrong, because 1200 seconds are not equal with 0 hour, I wish to see there either _0.33333_ hours OR I prefer much more _0 hour 20 min_
    Have somebody any ideas?
    I've tried to make a view in database and import it as CHAR datatype to database but it is not solution also, because if I filter in BI application or try to make a SUM the BI would drop errors..
    Regards,
    Laszlo

    Hi,
    Refer this links,this is exactly fulfill your requirement.
    OBIEE 11g - Change seconds to DD HH:MM:SS format
    OBIEE Functions
    share the updates..... :)
    mark if helpful/correct....

  • Concatenation error - when i use text column value in where condition.

    Hi,
    i am creating Materialized view using few columns from two tables and as per requirement i need to prepare select statement with where condition in another column.(new column)
    i tried like below....
    create materialized view MAIN
    refresh force on demand
    as
    select
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '|| b.trial_name||';' "QUERY"
    from
    exp_csv_tB a,
    exp_csv_tr b;
    a.table name value is : monitoring_table
    a.column_name value is : study
    b.trial_name = fty777
    Materialized view created with extra column but it is not added '' (codes) to text value in where condition.
    output which i got is :
    select * from monitoring_table where study = fty777;
    but
    i need output like
    select * from monitoring_table where study = 'fty777';
    fty777 value should be in codes like 'fty777'. i read some articles but didnt get this example.
    please help.

    Try this:
    CREATE MATERIALIZED VIEW main
    REFRESH FORCE ON DEMAND
    AS
    SELECT
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '''|| b.trial_name||'';'' "QUERY"
    FROM
    exp_csv_tb a,
    exp_csv_tr b;
    You have to give double single codes for semi-colons ..
    Regards..

  • I am trying to delete an XLS file from a network drive and am getting a message that says the file cannot be deleted because it is in use.  I can't see where it is in use and have tried to reboot the computer to no avail.

    I am trying to delete an XLS file from a network drive and am getting a message that says the file cannot be deleted because it is in use.  I can't see where it is in use and have tried to reboot the computer to no avail.  I can delete other files but several XLS files are giving me this message.

    You said it was a network drive.  So is someone else on the network using that same file or may have have left with excel still accessing it on their system?

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • For all entries Where condition character length partilally has to be used

    Hi,
    I need to fetch all the data reocrds of one internal table into the other with the condition that in one of the field of first internal table only partial length of the character has to be used as a where condition.
    Example:
    Select xxxx
              yyyyy
              zzzzz
    into it_tab2
    for all entries in itab1
    where field2 = itab1-field1(4).
    where field1 of itab1 has length of 8 and field2 belongs to itab2.
    As it throws the error msg :
    it will ignore the length restriction mentioned in where condition of the for all entries

    Hi.
    If you are trying to fetch from any database table based on your modified table use this logic.
    Dfine another internal table same as itab1, with field one lenght as 4 char.
    ex:
    data: begin of it_tab2.
            field1(4),
    end of it_tab2.
    loop at it_tab1.
    it_tab2 = itab1+0(4).
    append it_tab2.
    clear it_tab2.
    endloop.
    now you can fetch from database table....using it_tab2.
    Select xxxx
    yyyyy
    zzzzz
    into it_tab3
    for all entries in itab2
    where field2 = itab2-field1(4).
    If you only want to move the entries form one internal table to another internal table and truncate the field1 of itab1.
    then no need to use any for all entries...
    apply this logic
    data: begin of it_tab2.
            field1(4),
    end of it_tab2.
    loop at it_tab1.
    it_tab2 = itab1+0(4).
    append it_tab2.
    clear it_tab2.
    endloop.
    Regards,
    Satish

  • Can we use EXISTS in where condition

    hi all,
    can we use EXISTS (instead of IN) in where condition of a query which is not part of a subquery ?
    for e.g:
    update gpf_vou_sm set up_amt=0 where src_cd exists ('1101','1201');
    the query works fine with the IN operator in place of EXISTS.
    anybody please help.
    thomas k prakash

    Hi:
    You can use EXISTS in where clause but not in that syntax.
    UPDATE gpf_vou_sm g
       SET up_amt = 0
    WHERE EXISTS (SELECT 1
                     FROM gpf_vou_sm
                    WHERE src_cd IN ('1101', '1201') AND id = g.id);Using IN in your case is better...
    Saad,

  • How to use wildcards in ABAP query where condition?

    Hi,
    Please tell me how to use wildcards in ABAP qurey where condition.
    e.g. select * from mara where matnr = * (wildcard we need to use.
    Thanks & Regards,
    Gaurav T

    Do you want to query asterix * ?
    select * from mara where matnr = '*'.  "then just put it in apstrophes
    or you want certain part of string be used as * ?
    select * from mara where matnr like '%*'  "then use % sign before it
    or maybe you want something like this
    select * from mara where matnr like '%1' . "then it will look for all materials having '1' inside it
    Regards
    Marcin

Maybe you are looking for

  • I lost one of my "work area" markers

    Hello, I somehow lost one of my work area markers. How do I get it back onto the timeline ? On this subject, I always find it awkward when I try to drag the left marker to the left side of my work area footage on the timeline, is there not an easier

  • Error while developing KFF in oaf

    Hi, i'm trying to create sample page with KFF. Details as follows: VO name: GLCodeCombinationsVO Attribute: CodeCombinationId I have attached this VO to OASampleKFFAM I have created SampleKFFPG with following item id: item1 item style: flex view inst

  • Modify data in the table control

    hello: i would like to ask a favor , i am working with a table control (it already has the information i need) all the fields all my table control are present in output form only, but i need when the user press a pushbutton to modify a specific data

  • Sony DSR-PDX10 Camcorder

    why when i hit record on my DSR-PDX10 Sony Camcorder, it is telling me that it is recording but when i turn it to VCR mode and rewind back what i just recorded nothing is their? it is just a plain blue screen. their isnt even the amont of time in the

  • BB Curve 8900 streaming video outdoors ?

    Hi i recently signed up to 02 web and text bolt on and can recieve web fine outdoors but when i try and play streaming video from youtube it says please change over to WAP so i do and it does not work - is this because the 8900 does not come with 3g