Query OBIEE Dimensions only.

My client has an obligation to report not only on the dimensions in OBIEE. I understand that BI needs at least a measure of a server table of facts in the application to perform a query. Is it possible to build a fake reality in the logical layer linking 2 or more dimensions to run such a query? If Yes, how can this be done?

Hello user,.
You can follow this blog by Rittman... Hoepfully this helps

The only thing to create a shadow table that should act as a table of facts in your case.

http://www.rittmanmead.com/2009/08/Oracle-BI-EE-10-1-3-4-1-reporting-on-non-transactional-dimension-values-equivalence-of-outer-joins/

Please let us useful knowledge, and please don't forget to close the message by assigning this :)

Tags: Business Intelligence

Similar Questions

  • A query to extract only the non-null columns.

    Hello

    I have a table with:

    COLA, COLB TEACHERS COLD COLE

    AA BB < null > < null > JJ

    < Null > < null > CC < null > EE


    I need a query that retrieves only 1 rows like this:

    COLA, COLB TEACHERS COLD COLE

    AA BB CC DD EE


    My version of the database is 11.2


    Thnak you

    odd design but in this case, you could go with MAX (or MIN)

    HTH

  • How to write a hierarchical query so that only the child nodes are displayed?

    Hi all

    I have a hierarchical query that I use in an area of tree demand APEX and there are nodes that have no children and I am trying to find a way to not display these nodes. Essentially if the user does not have to develop a lot of knots to know that nothing exists at the most detailed level.

    The data are based on the Oracle Fusion FND tables but for example purposes here is enough data to illustrate my question:


    create table APPL_TAXONOMY_HIERARCHY (SOURCE_MODULE_ID varchar2(30), TARGET_MODULE_ID varchar2(30));
    create table APPL_TAXONOMY_TL (module_id varchar2(30), description varchar2(100), user_module_name varchar2(30), language varchar2(5));
    create table APPL_TAXONOMY (MODULE_ID    varchar2(30),    MODULE_NAME    varchar2(30), MODULE_TYPE varchar2(10),    MODULE_KEY varchar2(30));
    create table TABLES (table_name varchar2(30), module_key varchar2(30));
    
    

    insert into APPL_TAXONOMY_TL values ('1', null, 'Oracle Fusion', 'US' );
    insert into APPL_TAXONOMY_TL values ('2', null, 'Financials', 'US' );
    insert into APPL_TAXONOMY_TL values ('3', null, 'Human Resources', 'US' );
    insert into APPL_TAXONOMY_TL values ('20', null, 'Accounts Payable', 'US' );
    insert into APPL_TAXONOMY_TL values ('10', null, 'General Ledger', 'US' );
    
    insert into APPL_TAXONOMY_HIERARCHY values ('1', 'DDDDDDDD');
    insert into APPL_TAXONOMY_HIERARCHY values ('2', '1');
    insert into APPL_TAXONOMY_HIERARCHY values ('3', '1');
    insert into APPL_TAXONOMY_HIERARCHY values ('4', '1');
    insert into APPL_TAXONOMY_HIERARCHY values ('10', '2');
    insert into APPL_TAXONOMY_HIERARCHY values ('20', '2');
    
    insert into APPL_TAXONOMY values ('1', 'Fusion', 'PROD', 'Fusion');
    insert into APPL_TAXONOMY values ('2', 'Financials', 'FAMILY', 'FIN');
    insert into APPL_TAXONOMY values ('10', 'GL', 'APP', 'GL');
    insert into APPL_TAXONOMY values ('3', 'Human Resources', 'FAMILY', 'HR');
    insert into APPL_TAXONOMY values ('20', 'AP', 'APP', 'AP');
    
    insert into tables values ('GL_JE_SOURCES_TL','GL');
    insert into tables values ('GL_JE_CATEGORIES','GL');
    

    My hierarchical query is as follows:

    with MODULES as
    (
    SELECT h.source_module_id, b.user_module_name, h.target_module_id
          FROM APPL_TAXONOMY_HIERARCHY H,
          APPL_TAXONOMY_TL B,
    APPL_TAXONOMY VL
    where H.source_module_id = b.module_id
    and b.module_id = vl.module_id
    and vl.module_type not in ('PAGE', 'LBA')
    UNION ALL
    select distinct table_name, table_name,  regexp_substr(table_name,'[^_]+',1,1) 
    from TABLES --needed as a link between TABLES and APPL_TAXONOMY
    union all
    select module_key as source_module_id, module_name as user_module_name, module_id as target_module_id  from appl_taxonomy VL where VL.module_type = 'APP')
    SELECT  case when connect_by_isleaf = 1 then 0
                when level = 1             then 1
                else                           -1
           end as status,
    LEVEL,
    user_module_name as title,
    null as icon,
    ltrim(user_module_name, ' ') as value,
    null as tooltip,
    null as link
          FROM MODULES
          START WITH source_module_id = '1'
          CONNECT BY PRIOR source_module_id = target_module_id
    ORDER SIBLINGS BY user_module_name;
    

    In Oracle APEX, this gives a tree with the appropriate data, you can see here:

    https://Apex.Oracle.com/pls/Apex/f?p=32581:29 (username: guest, pw: app_1000);

    The SQL of the query results are:

    STATUSTITLE LEVELVALUE

    ---------- ---------- ------------------------------ ------------------------------

    11 oracle FusionOracle Fusion
    -12 financial tablesFinancials
    -13 accounts payableAccounts payable
    04 APAP
    -1General Accounting 3General Accounting
    -14 GLGL
    05 GL_JE_CATEGORIESGL_JE_CATEGORIES
    05 GL_JE_SOURCES_TLGL_JE_SOURCES_TL
    02 human resourcesHuman resources

    The lowest level is the name of the table to level 5. HR is not any level under level 2, in the same way, "AP" (level 4) has nothing below, i.e. no level 5 and that's why I don't want to show these nodes. Is this possible with the above query?

    Thanks in advance for your suggestions!

    John

    Hello

    The following query will include only the nodes of level = 5 and their ancestors (or descendants):

    WITH modules LIKE

    (

    SELECT h.source_module_id

    b.user_module_name AS the title

    h.target_module_id

    To appl_taxonomy_hierarchy:

    appl_taxonomy_tl b

    appl_taxonomy vl

    WHERE h.source_module_id = b.module_id

    AND b.module_id = vl.module_id

    AND vl.module_type NOT IN ('PAGE', "LBA")

    UNION ALL

    SELECT DISTINCT

    table-name

    table_name

    , REGEXP_SUBSTR (table_name, ' [^ _] +')

    From the tables - required as a link between the TABLES and APPL_TAXONOMY

    UNION ALL

    SELECT module_key AS source_module_id

    AS user_module_name module_name

    module_id AS target_module_id

    Of appl_taxonomy vl

    WHERE vl.module_type = 'APP '.

    )

    connect_by_results AS

    (

    SELECT THE CHECK BOX

    WHEN CONNECT_BY_ISLEAF = 1 THEN 0

    WHEN LEVEL = 1 THEN 1

    OF ANOTHER-1

    The END as status

    LEVEL AS lvl

    title

    -, NULL AS icon

    , LTRIM (title, "") AS the value

    -, NULL as ToolTip

    -, Link AS NULL

    source_module_id

    SYS_CONNECT_BY_PATH (source_module_id - or something unique

    , ' ~' - or anything else that may occur in the unique key

    ) || ' ~' AS the path

    ROWNUM AS sort_key

    Modules

    START WITH source_module_id = '1'

    CONNECT BY PRIOR Source_module_id = target_module_id

    Brothers and SŒURS of ORDER BY title

    )

    SELECT the status, lvl, title, value

    -, icon, tooltip, link

    OF connect_by_results m

    WHEN THERE IS)

    SELECT 1

    OF connect_by_results

    WHERE the lvl = 5

    AND the path AS ' % ~' | m.source_module_id

    || '~%'

    )

    ORDER BY sort_key

    ;

    You may notice that subqueries modules and the connect_by_results are essentially what you've posted originally.  What was the main request is now called connect_by_results, and it has a couple of additional columns that are necessary in the new main request or the EXISTS subquery.

    However, I am suspicious of the 'magic number' 5.  Could you have a situation where the sheets you are interested in can be a different levels (for example, some level = 5 and then some, into another branch of the tree, at the LEVEL = 6, or 7 or 4)?  If so, post an example.  You have need of a Query of Yo-Yo, where you do a bottom-up CONNECT BY query to get the universe of interest, and then make a descendant CONNECT BY query on this set of results.

  • Help with the query to select only one record from the result set in double

    Hello

    Please help with the query. Version of Oracle database we use is 10g R2.

    I have a vision that is duplicated IDS, but they are used across the different functions. See below examples of data. Please help me with a query to select only one record (based on ID regardless of the area) from the bottom of the result set of duplicate records. For what is the point of view is there unique records, given the combination of the fields ID, Org, DF, dry, Sub-Sec

    ID
    Org
    DF
    Sec Sub-Sec

    (163)CQCPDMCPDMHD(163)PCENGENGENG(163)CQASICASICIS8888TSTACTACTAC(163)TSHEHESW6789CQINFOINFOFOS6789PCSECSYSSECSYSINFO16789TSSECSYSSECSYSINFO29009PCBMSBMSBMS1

    My result set must eliminate the duplicate identifiers regardless of whoever we choose of the result set. (I mean without distinction Org, DF, s, Sub-s). My expected result set should be.

    ID
    DSB

    DF
    SEC
    Sub-Sec
    (163)CQCPDMCPDMHD8888TSTACTACTAC6789CQINFOINFOFOS9009PCBMSBMSBMS1


    Thank you

    Orton

    Hello

    This sounds like a job for ROW_NUMBER:

    WITH got_r_num AS

    (

    SELECT id, DSB, df, s, sub_sec org

    ROW_NUMBER () OVER (PARTITION BY ID.

    ORDER BY org

    ) AS r_num

    OF view_x

    )

    SELECT id, DSB, df, sub_sec s,

    OF got_r_num

    WHERE r_num = 1

    ;

    He is a Top - N query example, where you choose the elements of N (N = 1 in this case) from the top of an ordered list.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and INSERT, only relevant columns instructions) to your sample data and the results desired from these data.  (I know that you said that you were a view selection.  Just for this thread, pretending it is a picture and post simple CREATE TABLE and INSERT statements to simulate your point of view).
    Point where the above query is to produce erroneous results, and explain, using specific examples, how you get the right results from data provided in these places.  (I didn't quite understand the explanation above.  I don't know why you want to

    ID ORG DF DRY SUB_SEC

    --      ---     --      ---     -------

    1234 CQ DPRK DPRK HD

    and is not

    1234 IS CQ ASIC, ASIC

    or

    TS 1234 IT IT SW

    or

    1234 CQ ASIC ASIC HD

    )
    If you change the query at all, post your modified version.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • Refine a query to display only the entries for the current week

    Hello.

    Anyone know how to change a query to display only those records that have dates of the current week? Records have a start date and an end date, so the query should recognize that the entry may be valid for more than one week?

    Kind regards

    swelch

    Hi Steve,.

    I just created a dataset that contained the periods before, during and after the current week - on the assumption that if any day of a range (start/end) falls within the current week so it is included.

    In my example this is 'today', June 25, 2011, and a week is defined as Sun - Sat. So my week of 'course' is u 19 June 2011 / I June 25, 2011.

    A line any with a start date before or during my 'current' week and an end date that is after or during my "current" week, i.e. no matter what date in its range included in the 'in progress' week will appear.

    See you soon,.
    Rob

  • Refresh table-form query on table only for pages in .jsff

    I have a group being generated as a presentation of table form. I would like for the page of the table to always refresh, and submit the form to refresh page after.
    I saw a thread about how to do this on a .jspx page: Refresh table-form query on table only

    Unfortunately, this does not work for me because I use the .jsff pages and they do not have access to the facesContext. Does anyone know how to do this for a .jsff page?

    Thank you
    Michelle

    Michelle,

    The taskflow 11 ADF in the equivalent of the region of this expression would be

    #{jhsPageChanged and controllerContext.currentViewPort.viewId=='/MyGroupTaskFlow/MyGroupTable'}

    Unfortunately, this currently does not work because there is an error in the JhsNavigationHandlerImpl class we're going to fix in the next release.
    You can apply a work around by creating a subclass of JhsNavigationHandler and replace as follows:

    ' public Sub handleNavigation (FacesContext facesContext, string action,
    The string result)
    {
    String oldPageFragmentId = ControllerContext.getInstance () .getCurrentViewPort () .getViewId ();
    super.handleNavigation (facesContext, action, result);
    String newPageFragmentId = ControllerContext.getInstance () .getCurrentViewPort () .getViewId ();
    If (! oldPageFragmentId.equals (newPageFragmentId))
    {
    JsfUtils.storeOnRequest (JHS_PAGE_CHANGED, Boolean.TRUE);
    }
    }

    To use your subclass, create a custom template for the facesConfig.vm and modify the navigation Manager to use your subclass.

    Steven Davelaar,
    JHeadstart team.

  • Need help to write a MySQL query that returns only the peer matching records

    Because I don't know how to explain it easily, I use the table below as an example.

    I want to create a MySQL query that returns only the records that match counterparts where 'col1' = 'ABC '.

    Notice the ' ABC / GHI' record does not have a Counter-match ' GHI / ABC' record. This record must not be returned because there is no Counter-Party correspondent. With this table, the ' ABC / GHI' record should be the one returned in the query.

    How can I create a query that will do it?


    ID | col1 | col2
    --------------------
    1. ABC | DEF
    2. DEF | ABC
    3. ABC | IGS
    4. DEF | IGS
    5. IGS | DEF


    * Please let me know if you have no idea of what I'm trying to explain.

    I wanted to just the results where col1 = ABC, but I already got the answer I needed on another forum. Thank you anyway.

    SELECT a.col1,
    a.col2
    FROM table_name AS a
    LEFT OUTER
    Table_name JOIN b
    ON b.col1 = a.col2
    AND a.col1 = b.col2
    WHERE b.col1 IS NOT NULL AND a.col1 = 'ABC '.

  • Query OBIEE adding additional tables in from clause

    Hello

    I have a logic with multiple LTS in tables when trying to query form only one column this logic table adds a few additional tables in which the clause of the query. Could if it you please let me know what could be the reason behind this issue.

    Here, I would add the query should be and what query generates OBIEE.

    I have a logical table - T_SO_ACCRUAL_PRODUCTS with source table logic multi.

    tables is LTS - INV_PRODUCT_GROUP1, Inv_Accrual_Groups, Inv_Grade_Code, Inv_Item_Classes, Inv_Item_Codes, PS_DAILY_STANDING_DETAILS, T_So_Customer_Request, PS_DAILY_STANDING_DETAILS_FREZ, T_So_Request_Details, T_SO_ADJUSTED_QTY, T_SO_ACCRUAL_MASTER, T_SO_ACCRUAL_PRODUCTS

    Now I have an ITEM_NUMBER column in the Inv_Item_Codes table (which I added in forT_SO_ACCRUAL_PRODUCTS LTS).

    I select only that ITEM_NUMBER in analysis of BI to find only the ITEM_NUMBER in INV_ITEM_CODE, so that the query selection must be--

    Select 0 distinct as c1.

    D1. C1 C2

    Of

    (select distinct T2010613. ITEM_NUMBER C1

    Of

    SALES_E0. D1 INV_ITEM_CODES T2010613)

    But the query I get in the nqquery.log file.

    Select 0 distinct as c1.

    D1. C1 C2

    Of

    (select distinct T2010613. ITEM_NUMBER C1

    Of

    SALES_E0. INV_ITEM_CODES T2010613,

    SALES_E0.PS_DAILY_STANDING_DETAILS T2010846,

    SALES_E0.PS_DAILY_STANDING_DETAILS_FREZ T2010861,

    T_SO_CUSTOMER_REQUEST T2011274,

    T_SO_REQUEST_DETAILS T2011561,

    SALES_E0. T_SO_REQUEST_TRANSACTIONS T2011657

    where (T2010613. ITEM_NUMBER = T2010846. ITEM_NUMBER and T2010613. ITEM_NUMBER = T2010861. ITEM_NUMBER and T2010613. ITEM_NUMBER = T2011561. ITEM_NUMBER and T2010613. ITEM_NUMBER = T2011657. ITEM_NUMBER and T2010846. CUSTOMER_NUMBER = T2011274. CUSTOMER_NUMBER and T2010861. CUSTOMER_NUMBER = T2011274. CUSTOMER_NUMBER and T2011274. REQUEST_NUMBER = T2011561. REQUEST_NUMBER and T2011561. ITEM_NUMBER = T2011657. ITEM_NUMBER and T2011561. LINE_NUMBER = T2011657. LINE_NUMBER and T2011561. REQUEST_NUMBER = T2011657. REQUEST_NUMBER)

    ) D1

    I don't understand, why is the addition of these additional tables that I select only one column of the INV_ITEM_CODES table.

    Does anyone have an idea about it, why he adds these additional tables in the query?

    Thank you in advance for your help!

    Gerard

    [nQSError: 43119] Query Failed: [nQSError: 14025] indeed no table exists at the level of detail required

    Possible reasons:

    (1) level of content is not defined in the layer MDB of the SPR to one of the measures or dimension

    Logical Table-> content-> logical level tab-> Fact1/Fact2/Dim1: Source

    (2) Admintool WARNING: logical dimension table [39008]... a... a source that do not adhere to any source of fact.

    -> to check business model (and by the way of physical model) diagram for: Fact1, Fact2, Dim1

    (3) lack of aggregation method the measurement made ('Aggregation' of the measurement column tab)

    -> set aggregation (perhaps ' amount') for measures

    Looks like you have a lot of tables, but put them as sources of logical table, when they could not logically be related ' ' it... If you want you can send me your SPR and I can watch what you are doing.

  • SQL query to retrieve only numbers to a string variable

    Dear all Experts,

    I have a requirement in one of my projects where I need to extract only the numbers present in the variable.

    for example:

    BANK_ACCOUNT_NUMBER = 12345-67890';

    BANK_ACCOUNT_NUMBER = 12345 67890';

    BANK_ACCOUNT_NUMBER = "123.456.7890";

    BANK_ACCOUNT_NUMBER = 123-A456BC7890D';


    In all these cases, I need to retrieve only numbers such as BANK_ACCOUNT_NUMBER = 1234567890 and I am looking for SQL query only.


    Please suggest me the query how to extract numeric values from varchar variable.



    Thank you

    Knockaert

      select regexp_replace('123-A456BC7890D','[^0-9]') from dual;
    

    See you soon,.

    Manik.

  • Query a Table only once

    Hello

    I have an obligation to appoint all transactions in a store except inversions. So I wrote the query as follows

    with trn as
    ( select 1 t_key, 1 invoice#, 'A' Client, 'P1' Product, 'N' reversal from dual
     union all
    select 2 t_key, 2 invoice#, 'B' Client, 'P1' Product, 'N' reversal from dual
    union all
    select 3 t_key, 3 invoice#, 'C' Client, 'P1' Product, 'N' reversal from dual
    union all
    select 4 t_key, 3 invoice#, 'C' Client, 'P1' Product, 'Y' reversal from dual
    ), rev_t as
    (select distinct invoice# from trn where reversal = 'Y')
    select * from trn
    where not exists (select 'x' from rev_t where rev_t.invoice# = trn.invoice#);
    
    

    But in the real world scenario I table of 120 million transactions. If you notice that I consulted trn table 2 times - once in rev_t and the other in the main query. This causes a problem of enormous performance for me. Could you please suggest better otherwise if while accessing to trn don't table only once.

    Use Analytics:

    with NRT as)

    Select 1 t_key, 1 invoice #, 'A' customer, the product "P1", "n" everyone inversion the double union

    Select 2-t_key, 2 invoice #, Client "B", "P1" product, inversion of "n" of all the double union

    Select 3-t_key, 3 invoice #, customer 'C', 'P1' product, inversion of "n" of all the double union

    Select 4 t_key, 3 invoice #, 'C' Client, produces 'P1', 'Y' reversal of the double

    ),

    rev_t like)

    Select trn.*,

    Max (case inversion when 'Y' then 1 else 0 end) on y_flag (partition of invoice #)

    NRT

    )

    Select t_key,

    Invoice #.

    customer,

    product,

    reversal

    of rev_t

    where y_flag = 0

    /

    T_KEY INVOICE # C PR R
    ---------- ---------- - -- -
    1 1 N P1
    2 2 N P1

    SQL >

    And if the reversal can be only Y/N or null:

    with NRT as)

    Select 1 t_key, 1 invoice #, 'A' customer, the product "P1", "n" everyone inversion the double union

    Select 2-t_key, 2 invoice #, Client "B", "P1" product, inversion of "n" of all the double union

    Select 3-t_key, 3 invoice #, customer 'C', 'P1' product, inversion of "n" of all the double union

    Select 4 t_key, 3 invoice #, 'C' Client, produces 'P1', 'Y' reversal of the double

    ),

    rev_t like)

    Select trn.*,

    Max (Reversal) on y_flag (partition of invoice #)

    NRT

    )

    Select t_key,

    Invoice #.

    customer,

    product,

    reversal

    of rev_t

    where y_flag = ' don't

    /

    SY.

  • Query is not only on the third attempt after Extension VO to payments Search Page

    Hello

    Can someone help me solve the issue, I am facing after the Extension of the VO of the search manager of payment Page. I only added 6 columns aggregated to the VO and displaying only one in a field that I added customization. The page is refreshing fine to the launch and also when first questioned using the bean of the query, but second time go it is a failure.

    Click Start Action:

    At the request of payment page is automatically queried. He is seeded feature. I added the column provider remaining Amt by VO Extension, which is also questioned.

    Enter a search term (e.g., the beneficiary) and click GO. The results are questioned correctly

    When I do a search again (they use the same criteria of search, or other) and click go, I am getting an error.

    oracle.jbo.SQLStmtException: 27122 Houston: SQL error in the preparation of the statement

    java.sql.SQLException: invalid column type. (Complete error log and request for Extension VO downloaded)

    I tried the query in the SQL error page * more, there is no syntax errors, and it successfully retrieves data.

    Can anyone suggest why the error occurs, or how I should go about debugging it. It is strange that the launch the query is executing successfully, and also when I perform a search for the first time - but the second time, it's a failure.

    In the wake of the VO I only added 6 global analytical columns, for example

    SUM (ApSelectedInvoicesEO. AMOUNT_REMAINING) ON VENDOR_AMT_REM (ApSelectedInvoicesEO.VENDOR_ID SCORE)

    But I don't know why it should cause the query to fail.

    I'm running the EBS (R12.1.3) page, not of JDeveloper.

    / Oracle/Apps/AP/Payments/WebUI/HomePG >/oracle/apps/ap/payments/ESP/webui/PsrSearchPG >/oracle/apps/ap/payments/ps/webui/SelectedPsPG.

    It's the SelectedPsPG that I have extended/custom

    Thank you

    Sanjay

    Hello

    Change the style of link vo extended in positional Oracle and try again.

    Kind regards

    Anil

  • Error running query of database only with goDaddy

    A that someone already had this problem...

    I have an installation of Access db with a Memo field to place some articles on a page. Whenever we try to write more than 500 characters, it throws the below error. Under 500 characters or with any other hosting company, it works fine.

    Run database query error.
    Application uses a value of the wrong type for the current operation.

    The error occurred in D:\Hosting\whateverpath\add-news.cfm: line 3

    1: < cfinclude template = "include_CheckAuthority.cfm" >
    4.
    3: < cfinsert datasource = "whateverdatasource" tablename = "News" >
    4:
    5: < cfset login = "news.cfm?" Message ="and URLEncodedFormat ("News item added!") >

    SQL insert into News (NEWSAUTHOR, NEWSCONTENT, NEWSTITLE) values ((param 1), (param 2), (param 3))
    Whateverdatasource DATA source
    SQLSTATE

    I spent hours on the phone with these people and it is clear that no one he knows nothing cfserver at all. They should not yet be running in my opinion.

    Thank you!
    David

    Thanks for the reply Ken, who well fix. I'll have to remember that one!

  • Query that count only the column null lines

    create table test
    (a varchar2 (10))
    b varchar2 (10),
    c varchar2 (10),
    d varchar2 (10),
    e varchar2 (10));


    SQL > DESC TEST
    Name Null? Type
    ------------------------------- -------- ----
    A VARCHAR2 (10)
    B VARCHAR2 (10)
    C VARCHAR2 (10)
    D VARCHAR2 (10)
    E VARCHAR2 (10)

    SQL > SELECT * FROM TEST;

    A B C D E
    ---------- ---------- ---------- ---------- ----------
    A1 - A3 A4-
    B1 - B3, B4-
    C1 - C3 C4-
    D1 - D4 D5
    -E2 - E4 E5


    I want an application that only count the rows of the column as null

    A B C D E
    --- ---- ----- ------ -------
    1 4 2 0 3

    Published by: Nilesh hole, Pune, India, on August 28, 2009 12:30
    select SUM(case when a is null then 1 else 0 end)
          ,SUM(case when b is null then 1 else 0 end)
          ,SUM(case when c is null then 1 else 0 end)
          ,SUM(case when d is null then 1 else 0 end)
          ,SUM(case when e is null then 1 else 0 end)
    from TEST
    /
    

    Published by: Toon Koppelaars August 28, 2009 09:07

  • Refine a query to return only one day in the current week

    Hello again,

    Sorry, I thought I could work this given my previous help on the forum but I can't.

    What I do now is to look at the date ranges of records and display which of them are active on a given day of the current week. So for the week beginning June 27, 2011, a Monday, I need to see the records that are present on that day. The same thing on Tuesday, sea, game, Fri.

    Any ideas?


    Kind regards

    Steve Welch

    Hi Steve,.
    No doubt there is a way more elegant to do, but based on my previous post example...

    SELECT TO_CHAR (begin_date, 'DD-Mon-YYYY HH24:MI:SS') AS begin_date,
    TO_CHAR (end_date, 'DD-Mon-YYYY HH24:MI:SS') AS end_date,
    CASE WHEN TRUNC(begin_date) NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 7 THEN 'X' END AS "Sun",
    CASE WHEN TRUNC(begin_date) NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 6 THEN 'X' END AS "Mon",
    CASE WHEN TRUNC(begin_date) NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 5 THEN 'X' END AS "Tue",
    CASE WHEN TRUNC(begin_date) NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 4 THEN 'X' END AS "Wed",
    CASE WHEN TRUNC(begin_date) NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 3 THEN 'X' END AS "Thu",
    CASE WHEN TRUNC(begin_date) NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 2 THEN 'X' END AS "Fri",
    CASE WHEN TRUNC(begin_date) NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') -1 THEN 'X' END AS "Sat"
    FROM mydates
    WHERE TRUNC (begin_date) < NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') + 1
    AND TRUNC (end_date) > NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 7
    ORDER BY begin_date 
    

    would give

    BEGIN_DATE end_date Mon Mar sea game Fri Sat Sun
    June 15, 2011 06:48:29 June 25, 2011 06:48:29 X X X X X X X
    June 25, 2011 06:47:57 July 5, 2011 06:47:57 X

    See you soon,.
    Rob

    Published by: Robert Chalton on June 25, 2011 10:31

  • Query that returns only certain fields in Java

    Currently I use a filter that identifies certain keys, then get all the keys and get a unique value of each object. The rest of the object is important enough. I've seen references to the passage on the ability to do it, using CohQL, but I can't run Java.

    Basically, I want to do: "select the"Cache"box where key ="asdf '" I just want back the specific 'field' rather than the entire object. How can I do this?

    Thank you.

    Hi user13279246,

    You can do this by using the ReducerAggregator. Your code would look like:

    Filter filter = QueryHelper.createFilter(...);
    ValueExtractor extractor = new ReflectionExtractor("isReadOnly");
    Map mapResult = cache.aggregate(filter, new ReducerAggregator(extractor));
    

    The mapResult will be indexed by the actual cache keys, but the values will be extracted Boolean property.

    If you need to return a number of "columns", you would use the MultiExtractor instead. In this case, each value in the returned map would be a list of corresponding extracted properties.

    Kind regards
    Gene

    Published by: ggleyzer on February 15, 2011 16:41

Maybe you are looking for

  • How to stop the background music?

    Installed firefox. During navigation it is background music nonstop. SOP how this music

  • Bad signal TV on my Qosmio F20

    I am new user of qosmio F20-111 and I have some problems with reading a TV on this subject.I have a cable TV connection that I use for several years on my TV 'ordinary' (there is a very good signal).If I try to watch TV on my qosmio, it is VERY BAD V

  • Can not read the SCXI Accessories in LabVIEW

    Subject reference: 7317962 I have some difficulty to get incidental information of features implemented using LabVIEW (2010).  My approach is to use the material node DAQmx system to power the 'conDevices' in a loop, where a property node DAQmx Devic

  • How to cancel the wanted print 4500

    want to 4500 - how to cancel a pending print job

  • access to documents and settings in windows 7

    I'm having a problem of password for download.  Download provider, HDTracks, advises as last resort to remove it is a temporary file in Documents and Settings.  My problem is with windows 7, I can't open this file with a message "access denied."  Thi