Oracle BI Answers Problem Using Group By condition.

Hi All,
I'm new to Oracle BI. i have a requirment to count the number of opened request and number of closed request(month wise) from a table which have fallowing columns:
Date logged(Date) Status(character) Date closed(date)
8/12/2008 open null
8/19/2008 closed 8/21/2008
I also neeed the total closed request for a particular month irrespective of the opened month.( eg. if a request was raised in Apr and was closed in Aug shoulb be counted.)
For this requirment i modified the select query:
SELECT new_event.Month saw_0, new_event.opened saw_1, new_event.closed saw_2, new_event.Cmonth saw_3 FROM
(SELECT MONTHNAME(Events."Logged Date/time") as MONTH , COUNT(Events.Status) as opened,0 as closed,0 as Cmonth FROM Incidents WHERE ("Assigned Service Dept"."Assigned SVD" = 'WHG DSG SUPPORT') AND (Events.Status IN ('Open', 'Closed')) GROUP BY MONTHNAME(Events."Logged Date/time")
UNION
SELECT MONTHNAME(Events."Logged Date/time") as MONTH ,0 as Opened, COUNT(Events.Status) as closed,0 as Cmonth FROM Incidents WHERE ("Assigned Service Dept"."Assigned SVD" = 'WHG DSG SUPPORT') AND Events.Status = 'Closed' GROUP BY MONTHNAME(Events."Logged Date/time")
UNION
SELECT MONTHNAME(Events."Closure Date") as MONTH ,0 as Opened,0 as closed, COUNT(Events.Status) as Cmonth FROM Incidents WHERE ("Assigned Service Dept"."Assigned SVD" = 'WHG DSG SUPPORT') AND Events.Status = 'Closed' GROUP BY MONTHNAME(Events."Closure Date")) new_event
ORDER BY saw_0, saw_2, saw_3
Using This query i'm able to get the fallowing result set.
Month opened closed Cmonth
Apr 25 0 0
0 0 27
0 25 0
Aug 27 0 0
0 0 21
0 10 0
So I want to do a group by month and sum of closed, opened and cmonth column.
But when i add the group by condition i'm getting the error as "GROUP BY Condition Needed"
Thanks,
Sumit

Ignore the SQL let Analytics handle that for you, the key here is to get your model correct.
You need a Time Dimension (ie. a table full of calendar dates) which you join to your Fact table date columns in the Physical layer.
In the logical layer fact table you should have two columns #Open and # Closed - these will be based on a case condition sum aggregate ie.
No. Open
CASE WHEN closed_date IS NULL THEN 1
ELSE 0
END
No. Closed
CASE WHEN closed_date IS NOT NULL THEN 1
ELSE 0
END
If you then make sure you join your Time Dimension (create an alias for each instance) to the open and closed dates you'll be able to have a count of the items closed by Year/Month/Week/Date etc...

Similar Messages

  • A peculiar problem using jsp:include conditionally

    Hi,
    This is regarding usage of jsp:include in Myfaces 1.1.4.
    lets say the page containing the jsp:include statements as PARENT PAGE
    I have a requirement to display some components in the PARENT PAGE which are continued from the same form using different JSPs since the components are different based on a condition.
    I used the following code:
    <h:panelGrid id="CandidateRequestorView" rendered="#{RgsViewRequirementBB.displayCandidateView}" columns="1">
         <jsp:include page="/RGSPages/requestorViewReq.jsp"/>
    </h:panelGrid>
    <h:panelGrid id="CandidateMatcView" rendered="#{!RgsViewRequirementBB.displayCandidateView}" columns="1">
         <jsp:include page="/RGSPages/matcViewReq.jsp"/>
    </h:panelGrid>Now if I use only 1 panel grid (any one out of the above 2) it works. I didnt even use <f:subview> any where( neither in the PARENT PAGE nor in the included jsps), but it works.... Also for your knowledge these jsps contain only JSF elements( no plain HTML code is used)
    But if I am using the above displayed code to have both the jsps (actually only one will be displayed bcoz the same condition is used)
    then its not displaying all the contents of included jsp. (YES I AM ABLE TO GET TO THE JSP...THERE IS NO ERROR) There is a datatable inside this jsp which is not rendered......
    I have used <f:subview> when i faced this problem.......
    I have tried every combination....writing <f:subview> in the PARENT PAGE ....writing in included jsps and removed it from PARENT PAGE.....also some of the articles in the forum mentioned that <f:subview> element should not be used inside <h:panelgrid> .....i even tried that....but final result is same as I was getting the first time...
    I am able to reach the jsp page (with or without <f:subview>) but i am not able to display all the contents....but if i use only one of the included jsps(by removing any one of the panel grids) I am able to view them. Since I am able to view all the contents when i view these pages inside the PARENT PAGE one at a time, that indicates there is no problem in datatable contained in these pages.....
    ( Also I have not used <f:view> inside my included jsps.)
    Please help to solve this problem...
    Thanks
    Avner

    Hi BalusC,
    The RgsViewRequirementBB is already in the session scope.
    Also I am using the setDisplayCandidateView(true) or setDisplayCandidateView(false ) explicitly as depicted below. The page is still under construction thats why the rendered attribute is explicitly set.
    public RgsViewRequirementBackingBean() {
    super();
    // TODO Auto-generated constructor stub
    try{
                setDisplayCandidateView(true);
                 // some more code goes in here
         catch(Exception){
               ResourceBundle bundle = null;
               bundle = ResourceBundle.getBundle("resources.ErrorMessages", FacesContext.getCurrentInstance().getViewRoot().getLocale());
                 //some more code goes in here
    }

  • Oracle BI Answers Problem

    I have one dimension created repository and created a subject area in presentation layer I have three physical tables in physical layer
    for supplier
    supplier site
    and zone
    both zone and supplier is joined to supplier site and supplier is joined to remaining facts.
    So when I try to build report ussing the columns supplier and zone I am facing below mentioned issue
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14065] Illegal cross join within the same dimension caused by incorrect subject area setup: [ (SELECT mtp.partner_id SUPPLIER_ID, mtp.PARTNER_NAME SUPPLIER_NAME FROM MSC_TRADING_PARTNERS mtp WHERE mtp.partner_type=2) as T12405] with [ ( SELECT mr.region_id, decode(mr.region_type, 0, mr.country, 1, mr.country || '-' || mr.state, 2, mr.country || '-' || mr.state || '-' || mr.city, 3, mr.country || '-' || mr.state || '-' || mr.city || '-' || mr.postal_code_from || '-' || mr.postal_code_to, 10, mr.ZONE) ZONE, mr.COUNTRY_CODE, mr.STATE_CODE FROM MSC_REGIONS mr) as T12408] (HY000)
    SQL Issued: SELECT "- Sup".Supplier saw_0, "- Sup".Zone saw_1 FROM APS ORDER BY saw_0, saw_1
    Can anybody help me solving this issue.

    Ignore the SQL let Analytics handle that for you, the key here is to get your model correct.
    You need a Time Dimension (ie. a table full of calendar dates) which you join to your Fact table date columns in the Physical layer.
    In the logical layer fact table you should have two columns #Open and # Closed - these will be based on a case condition sum aggregate ie.
    No. Open
    CASE WHEN closed_date IS NULL THEN 1
    ELSE 0
    END
    No. Closed
    CASE WHEN closed_date IS NOT NULL THEN 1
    ELSE 0
    END
    If you then make sure you join your Time Dimension (create an alias for each instance) to the open and closed dates you'll be able to have a count of the items closed by Year/Month/Week/Date etc...

  • Huge problem using apple mail while sending email to a group...

    Hey - I am quite confused... apple mail has huge problems using groups with about 150 addresses when writing and sending an email... the writing of emails is nearly impossible. Once the group name is inserted in the addressline (address book in iCloud!), apple mail uses nearly 100% CPU and further writing is nearly impossible. When sending such an email, all addresses are suddenly visible - though the box is NOT checked and the addresses should be hidden... what can I do? I use this feature (sending mails to groups) on a daily basis and cannot accept visible addresses...
    Greetings and sorry for inconvenient english...
    Christof

    How about next time you send to the group, cc yourself, or include yourself in the group. Then receive the email on the iphone, you can "reply all" in order to send to the group. If you use an imap account, you can make a new folder, call it something like "groups", and save different group emails there for the next time you need to "reply all".

  • Crytal Report  Problem in Grouping

    I have problem in Group By option of Crystal Report. I have problem using Group By Option by selecting original order instead of  ascending.When i used original order idata is not summarised i.e. not group

    I donot understand  "group by must be according to order" it is ok when  I Select ascending order problem only in when i select original order instead of Ascending order
    Select* From (
    SELECT Top 9000000 'DB1'as 'Expr1000' ,T1.AcctCode,
    CASE WHEN T1.Postable = 'Y' THEN T1.Segment_0 + '' + T1.Segment_1 ELSE T1.AcctCode END 'Expr1002',T1.GrpLine,
    T1.AcctName, ISNULL(T1.FrgnName, 'X')'Expr1004', T0.Debit, T0.Credit, T0.FCDebit, T0.FCCredit,
    T0.SYSDeb, T0.SYSCred, T1.Levels, T1.Postable, T1.ExportCode, T1.ActType, T1.FatherNum,
    T1.GroupMask, T0.DueDate, T0.TransID, T0.RefDate,
    [dbo].[GET_MONTH_ID](T0.RefDate) as 'FY Month',
    [dbo].[GET_YEAR_ID](T0.RefDate) as 'FY Year',
    [dbo].[GET_BEGIN_FY](T0.RefDate) as 'Begin FY',
    [dbo].[GET_BEGIN_MONTH](T0.RefDate) as 'Begin Month',
    [dbo].[GET_END_MONTH](T0.RefDate) as 'End Month'
    FROM Test_C1].[dbo].[JDT1] T0 Right JOIN  [Test_C1].[dbo].[OACT] T1 ON T0.Account = T1.AcctCode order by grpline
    ) as c
    UNION All
    select * From(
    SELECT Top 90000000 'DB2' as 'Expr1000',
    T1.AcctCode,
    CASE WHEN T1.Postable = 'Y' THEN T1.Segment_0 + '' + T1.Segment_1 ELSE T1.AcctCode END 'Expr1002',T1.GrpLine,
    T1.AcctName,
    ISNULL(T1.FrgnName,'X') 'Expr1004',
    isnull(T0.Debit,0)as 'Debit',
    isnull(T0.Credit,0) as 'Credit',
    isnull(T0.FCDebit,0 ) as 'FCDebit',
    isnull(T0.FCCredit,0)as 'FCCredit',
    isnull(T0.SYSDeb,0)as 'SYSDedit',
    isnull(T0.SYSCred,0)as 'SYSCredit',
    T1.Levels,
    T1.Postable,
    T1.ExportCode,
    T1.ActType,
    T1.FatherNum,
    T1.GroupMask,
    T0.DueDate,
    T0.TransID,
    T0.RefDate,
    [dbo].[GET_MONTH_ID](T0.RefDate) as 'FY Month',
    [dbo].[GET_YEAR_ID](T0.RefDate) as 'FY Year',
    [dbo].[GET_BEGIN_FY](T0.RefDate) as 'Begin FY',
    [dbo].[GET_BEGIN_MONTH](T0.RefDate) as 'Begin Month',
    [dbo].[GET_END_MONTH](T0.RefDate) as 'End Month'
    FROM [Test_C2].[dbo].[JDT1] T0
    Right JOIN [Test_C2].[dbo].[OACT] T1 ON T0.Account = T1.AcctCode order by T1.grpline) as d

  • Problem using a conditional suppress in a cross-tab ?

    is there a problem using a conditional suppress in a cross-tab on a row  or summarized field  in crystal XI?
    I am using the following conditional suppress on a summarized field and its rows
             If {@SortCode}=4 then true;
    Sortcode is a group sorting formula field
    the summarized field is a formula field as well.
    All of the summarized fields are suppressed although the cross- tab performs correctly on @Sortcode  and the summarized field when not using the condition        
    it seems to me to be a reporting flow issue although i've included "whileprintingrecords" and "evaluateafter" with no success.
    i have also moved the cross-tab from the report header to group header and applied a conditional suppress on the group header through section expert.
    this supresses the group i dont want but includes grand totals for each group and also varys the number of columns
    i can't filter on sortcode because one of the grand total calculations requires those records and a subreport or second cross-tab does not contain the same number of columns
    the cross-tab is necessary as a client may have columns spanning one to many pages
    thanks for your help

    Hi I have a similar problem,
    I have an clock in solution, where i have some dates with data such as, various entries for a date eg, 01/11/2010 1hr, 01/11/2010 3 hrs etc, 03/11/2010 2hrs , 05/11/2010 4.5hrs, 05/11/2010 4 hrs so i need total for each day and highlight only those days, where total is less than 4.5, including days which donu2019t have records eg 02/11/2010 & 04/11/2010, I summarise in totals using a cross tab, to get summarised output for each day as,
                Totals
    01/11/2010    4
    03/11/2010    2
    05/11/2010    8.5
    in order to get the dates which didnu2019t have records, i added a dataset from Excel spreadsheet where i just have a sequential dates for the year , and use record selection to select only those dates in range which i need to display, so the result i get
    01/11/2010    4
    02/11/2010    0
    03/11/2010    2
    04/11/2010    0
    05/11/2010    8.5
    so far so good, all using cross tab, now i want to suppress rows which have total > 4.5 so the result should be
    01/11/2010    4
    02/11/2010    0
    03/11/2010    2
    04/11/2010    0
    How can i do that?

  • Oracle 10g Reports: Control Break using Group By Rollup

    Oracle 10g Contol-Break Reporting
    Hello. I am trying to create a report using Group By Rollup. The report should look like:
    MONTH......._WEEK_..... CODE.... TOTAL
    JULY..........WEEK 1..... K1...........2
    ............................. K1...........2
    .............................SUB:.........4
    ................WEEK 2..... K1...........2
    ............................. K1...........2
    .............................SUB:.........4
    ...............WEEK 3..... K1...........2
    ............................. K1...........2
    .............................SUB:.........4
    ...............WEEK 4..... K1...........2
    ............................. K1...........2
    .............................SUB:.........4
    ..........................MTH Tot:.....16
    AUG..........WEEK 1..... K1...........2
    ............................. K1...........2
    .............................SUB:.........4
    ................WEEK 2..... K1...........2
    ............................. K1...........2
    .............................SUB:.........4
    ...............WEEK 3..... K1...........2
    ............................. K1...........2
    .............................SUB:.........4
    ...............WEEK 4..... K1...........2
    ............................. K1...........2
    .............................SUB:.........4
    ..........................MTH Tot:.....16
    ..........................GRND TOT: 32
    Not sure how to group the codes into the correct month/week and the labels are a problem. Here is the table/data and a my poor attempt at using the Group by rollup. I'm still working on it but any help would be very nice.
    create table translog
    ttcd          VARCHAR2(5) not null,
    stime TIMESTAMP(6) not null,
    etime TIMESTAMP(6)
    insert into translog ( TTCD, STIME, ETIME)
    values ('T4', '01-JUL-12 12.00.01.131172 AM', '01-JUL-12 12.00.16.553256 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T4', '01-JUL-12 12.00.17.023083 AM', '01-JUL-12 12.00.37.762118 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('K2', '01-JUL-12 12.00.38.262408 AM', '01-JUL-12 12.00.40.686331 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('U1', '01-JUL-12 12.00.40.769385 AM', '01-JUL-12 12.00.41.281300 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('SK4', '08-JUL-12 12.00.41.746175 AM', '08-JUL-12 12.00.51.775487 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '08-JUL-12 12.00.53.274039 AM', '08-JUL-12 12.00.53.802800 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1','08-JUL-12 12.00.54.340423 AM', '08-JUL-12 12.01.03.767422 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '08-JUL-12 12.01.04.699631 AM', '08-JUL-12 12.01.04.744194 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('S2', '15-JUL-12 12.01.04.796472 AM', '15-JUL-12 12.01.04.817773 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '15-JUL-12 12.01.04.865641 AM', '15-JUL-12 12.01.05.154274 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '15-JUL-12 12.01.05.200749 AM', '15-JUL-12 12.01.05.508953 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '15-JUL-12 12.01.06.876433 AM', '15-JUL-12 12.01.07.510032 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '15-JUL-12 12.01.07.653582 AM', '15-JUL-12 12.01.07.686764 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('S2', '15-JUL-12 12.01.07.736894 AM', '15-JUL-12 12.01.08.163321 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '22-JUL-12 12.01.08.297696 AM', '22-JUL-12 12.01.08.562933 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '22-JUL-12 12.01.08.583805 AM', '22-JUL-12 12.01.08.620702 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '22-JUL-12 12.01.08.744821 AM', '22-JUL-12 12.01.08.987524 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '22-JUL-12 12.01.09.096695 AM', '22-JUL-12 12.01.09.382138 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '22-JUL-12 12.01.09.530122 AM', '22-JUL-12 12.01.10.420257 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '01-AUG-12 12.01.10.550234 AM', '01-AUG-12 12.01.10.581535 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('S2', '01-AUG-12 12.01.10.628756 AM', '01-AUG-12 12.01.10.656373 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '01-AUG-12 12.01.10.740711 AM', '01-AUG-12 12.01.10.768745 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '01-AUG-12 12.01.10.819635 AM', '01-AUG-12 12.01.10.900849 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '01-AUG-12 12.01.09.530122 AM', '01-AUG-12 12.01.10.420257 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '08-AUG-12 12.01.11.231004 AM', '08-AUG-12 12.01.24.073071 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '08-AUG-12 12.01.24.202920 AM', '08-AUG-12 12.01.24.244538 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('S2', '08-AUG-12 12.01.24.292334 AM', '08-AUG-12 12.01.24.318852 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '08-AUG-12 12.01.24.362643 AM', '08-AUG-12 12.01.24.397662 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1','15-AUG-12 12.01.09.530122 AM', '15-AUG-12 12.01.10.420257 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1', '15-AUG-12 12.01.24.414572 AM', '15-AUG-12 12.01.24.444615 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L2W', '15-AUG-12 12.01.24.478739 AM', '15-AUG-12 12.01.25.020265 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('K4', '15-AUG-12 12.01.25.206721 AM', '15-AUG-12 12.01.25.729493 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '15-AUG-12 12.01.25.784746 AM', '15-AUG-12 12.01.39.226921 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1','15-AUG-12 12.01.39.517953 AM', '15-AUG-12 12.01.50.775295 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '22-AUG-12 12.01.57.676446 AM', '22-AUG-12 12.01.58.252945 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '22-AUG-12 12.01.09.530122 AM', '22-AUG-12 12.01.10.420257 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '22-AUG-12 12.01.58.573242 AM', '22-AUG-12 12.02.10.651922 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('L1', '22-AUG-12 12.02.11.209305 AM', '22-AUG-12 12.02.24.140456 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('SK4','22-AUG-12 12.02.25.204035 AM', '22-AUG-12 12.02.25.580603 AM');
    insert into translog ( TTCD, STIME, ETIME)
    values ('T1','22-AUG-12 12.02.25.656474 AM', '22-AUG-12 12.02.25.689249 AM');
    select
    decode(grouping(trunc(stime)),1, 'Grand Total: ', trunc(stime)) AS "DATE"
    ,decode(grouping(ttcd),1, 'SUB TTL:', ttcd) CODE,count(*) TOTAL
    from translog
    group by rollup (trunc(stime),ttcd);}
    Thank you.

    830894 wrote:
    Oracle 10g Contol-Break Reporting
    Hello. I am trying to create a report using Group By Rollup. The report should look like:Couple of things:
    1) Your test data setup dows not match with your expected output &
    2) layout of data (like control break) should ideally be carried out using reporting tools
    Here is what you are probably looking for:
    SQL> select * from v$version ;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> create table translog
      2  (
      3  ttcd VARCHAR2(5) not null,
      4  stime TIMESTAMP(6) not null,
      5  etime TIMESTAMP(6)
      6  );
    Table created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T4', '01-JUL-12 12.00.01.131172 AM', '01-JUL-12 12.00.16.553256 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T4', '01-JUL-12 12.00.17.023083 AM', '01-JUL-12 12.00.37.762118 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('K2', '01-JUL-12 12.00.38.262408 AM', '01-JUL-12 12.00.40.686331 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('U1', '01-JUL-12 12.00.40.769385 AM', '01-JUL-12 12.00.41.281300 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('SK4', '08-JUL-12 12.00.41.746175 AM', '08-JUL-12 12.00.51.775487 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '08-JUL-12 12.00.53.274039 AM', '08-JUL-12 12.00.53.802800 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1','08-JUL-12 12.00.54.340423 AM', '08-JUL-12 12.01.03.767422 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '08-JUL-12 12.01.04.699631 AM', '08-JUL-12 12.01.04.744194 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('S2', '15-JUL-12 12.01.04.796472 AM', '15-JUL-12 12.01.04.817773 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '15-JUL-12 12.01.04.865641 AM', '15-JUL-12 12.01.05.154274 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '15-JUL-12 12.01.05.200749 AM', '15-JUL-12 12.01.05.508953 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '15-JUL-12 12.01.06.876433 AM', '15-JUL-12 12.01.07.510032 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '15-JUL-12 12.01.07.653582 AM', '15-JUL-12 12.01.07.686764 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('S2', '15-JUL-12 12.01.07.736894 AM', '15-JUL-12 12.01.08.163321 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '22-JUL-12 12.01.08.297696 AM', '22-JUL-12 12.01.08.562933 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '22-JUL-12 12.01.08.583805 AM', '22-JUL-12 12.01.08.620702 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '22-JUL-12 12.01.08.744821 AM', '22-JUL-12 12.01.08.987524 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '22-JUL-12 12.01.09.096695 AM', '22-JUL-12 12.01.09.382138 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '22-JUL-12 12.01.09.530122 AM', '22-JUL-12 12.01.10.420257 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '01-AUG-12 12.01.10.550234 AM', '01-AUG-12 12.01.10.581535 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('S2', '01-AUG-12 12.01.10.628756 AM', '01-AUG-12 12.01.10.656373 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '01-AUG-12 12.01.10.740711 AM', '01-AUG-12 12.01.10.768745 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '01-AUG-12 12.01.10.819635 AM', '01-AUG-12 12.01.10.900849 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '01-AUG-12 12.01.09.530122 AM', '01-AUG-12 12.01.10.420257 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '08-AUG-12 12.01.11.231004 AM', '08-AUG-12 12.01.24.073071 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '08-AUG-12 12.01.24.202920 AM', '08-AUG-12 12.01.24.244538 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('S2', '08-AUG-12 12.01.24.292334 AM', '08-AUG-12 12.01.24.318852 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '08-AUG-12 12.01.24.362643 AM', '08-AUG-12 12.01.24.397662 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1','15-AUG-12 12.01.09.530122 AM', '15-AUG-12 12.01.10.420257 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1', '15-AUG-12 12.01.24.414572 AM', '15-AUG-12 12.01.24.444615 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L2W', '15-AUG-12 12.01.24.478739 AM', '15-AUG-12 12.01.25.020265 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('K4', '15-AUG-12 12.01.25.206721 AM', '15-AUG-12 12.01.25.729493 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '15-AUG-12 12.01.25.784746 AM', '15-AUG-12 12.01.39.226921 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1','15-AUG-12 12.01.39.517953 AM', '15-AUG-12 12.01.50.775295 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '22-AUG-12 12.01.57.676446 AM', '22-AUG-12 12.01.58.252945 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '22-AUG-12 12.01.09.530122 AM', '22-AUG-12 12.01.10.420257 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '22-AUG-12 12.01.58.573242 AM', '22-AUG-12 12.02.10.651922 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('L1', '22-AUG-12 12.02.11.209305 AM', '22-AUG-12 12.02.24.140456 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('SK4','22-AUG-12 12.02.25.204035 AM', '22-AUG-12 12.02.25.580603 AM');
    1 row created.
    SQL> insert into translog ( TTCD, STIME, ETIME)
      2  values ('T1','22-AUG-12 12.02.25.656474 AM', '22-AUG-12 12.02.25.689249 AM');
    1 row created.
    SQL> commit ;
    Commit complete.
    SQL> select case when row_number() over (partition by mth order by mth, wk, ttcd) = 1 then mth end as "Month"
      2        ,case when row_number() over (partition by mth, wk order by mth, wk, ttcd) = 1 and wk is not null then 'WEEK '||wk end as "Week"
      3        ,case when gttcd = 1 and gwk = 0 and gmth = 0 then 'SUB:'
      4              when gttcd = 1 and gwk = 1 and gmth = 0 then 'Month Total:'
      5              when gttcd = 1 and gwk = 1 and gmth = 1 then 'Grand Total:'
      6              else ttcd
      7         end as "Code"
      8        ,cnt as "Total"
      9    from (
    10          select trunc(stime, 'MM') as mth, to_char(stime, 'W') as wk, ttcd, count(*) as cnt
    11                ,grouping(trunc(stime, 'MM')) as gmth, grouping(to_char(stime, 'W')) as gwk, grouping(ttcd) as gttcd
    12            from translog
    13           group by rollup(trunc(stime, 'MM'), to_char(stime, 'W'), ttcd)
    14           order by trunc(stime, 'MM'), to_char(stime, 'W'), ttcd
    15         ) ;
    Month     Week   Code              Total
    01-JUL-12 WEEK 1 K2                    1
                     T4                    2
                     U1                    1
                     SUB:                  4
              WEEK 2 L1                    2
                     SK4                   1
                     T1                    1
                     SUB:                  4
              WEEK 3 L1                    1
                     S2                    2
                     T1                    3
                     SUB:                  6
              WEEK 4 L1                    4
                     T1                    1
                     SUB:                  5
                     Month Total:         19
    01-AUG-12 WEEK 1 L1                    1
                     S2                    1
                     T1                    3
                     SUB:                  5
              WEEK 2 L1                    1
                     S2                    1
                     T1                    2
                     SUB:                  4
              WEEK 3 K4                    1
                     L1                    3
                     L2W                   1
                     T1                    1
                     SUB:                  6
              WEEK 4 L1                    4
                     SK4                   1
                     T1                    1
                     SUB:                  6
                     Month Total:         21
                     Grand Total:         40
    35 rows selected.

  • Problem using Export in Oracle 8.1.6.

    Hi,
    I have a problem using export utility in oracle 8i.
    I got a message:
    EXP-00056: ORACLE error 942 encountered
    ORA-00942: table or view does not exist
    EXP-00000: Export terminated unsuccessfully
    I tried running CATPROC.sql and CATEXP.sql but it did not correct the problem.
    Please help me.
    Thanks

    You may want to try using the error lookup tool available here, http://otn.oracle.com/pls/tahiti/tahiti.homepage?remark=tahiti You may be able to find the answer even though the error lookup tools is for 8.1.7 version. Otherwise, you can search the db discussion forums to see if this issue has been discussed already.

  • Oracle ADF 11g – Authentication using Custom ADF Login Form Problem

    Hi Guys,
    I am trying to Authenticate my adf application using custom Login Form.
    following this..
    http://www.fireboxtraining.com/blog/2012/02/09/oracle-adf-11g-authentication-using-custom-adf-login-form/#respond
    But my Login Page is not Loading.I think its sending request in chain.my jdev version is 11.1.1.5.Any Idea.
    Thanks,
    Raul

    Hi Frank,
    I deleted bounded code and In another Unit Test I created a simple login.jspx page and applied form based authentication but still facing same problem means something wrong in starting.
    My login.jspx page is
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" >
          <af:form id="f1" >
            <af:panelFormLayout id="pfl1">       
              <af:inputText label="USERNAME" id="it1"
                            />       
              <af:inputText label="PASSWORD" id="it2"
                              />
              <af:commandButton text="LOG IN" id="cb1" />
              <f:facet name="footer">       
              </f:facet>                 
            </af:panelFormLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>
    Don't know wht real problem is

  • Is there any known problem using Oracle SQL Developer 3.0.04 with Java 1.7?

    I'm new to Oracle. I have installed Oracle SQL Developer 3.0.04 and Java 1.7. When I run Oracle SQL Developer, I will get the window Running this product is supported with minimum Java version of 1.6.0_04 and a maximum version less than 1.7. This product will not be supported....
    Is there any known problem using Oracle SQL Developer 3.0.04 with Java 1.7?
    I have already downloaded Java 1.6 but don't know whether I need to uninstall Java 1.7 first. If don't need to uninstall Java 1.7, how can I set Oracle SQL Developer to run with Java 1.6?
    Thanks for any help.
    Edited by: 881656 on Aug 25, 2011 11:22 AM

    Hi,
    One prior post discussing the use of Java 7 is:
    SQL Developer 3.0  and Java SE 7?
    There is no need to uninstall any Java version (except if you have disk space constraints) and no problem switching between Java versions. This may be controlled in the sqldeveloper.conf file in your ...\sqldeveloper\sqldeveloper\bin directory via the SetJavaHome line. For example:
    #SetJavaHome ../../jdk
    SetJavaHome C:/Program Files/Java/jdk1.6.0_26
    #SetJavaHome C:/Program Files/Java/jdk1.7.0Regards,
    Gary Graham
    SQL Developer Team

  • Problems using Oracle Sql Developer

    Hello.
    I am tryng to use the developer but I have serious problems using it. Lags, freeze, blocked screens, fatal errors without messages that make me close the application.
    It is running on Windows 2000.
    Somebody have this problems too?
    Is this tool operative or is in beta state?
    Thanks a lot.
    Miguel De Belliz.
    Argentina.

    I executed a query & need to cancel the operation. However the busy cursor won't let me click Cancel (X) icon. Why ?
    Also from time to time a simple operation of copy / paste freezes the screen and eventually comes back to life after 4/5 minutes. Why ?
    Platform : Windows
    Version : WinXP2002SP2
    SQL Dev Version : 1.0.0.13.43
    Build : MAIN-13.43
    Java : 1.5.0_05
    Oracle IDE : 1.0.0
    Regards

  • Problem using Detail group region

    Hi Guys,
    I'm having problems using a detail group container. The problem is that when the detail group is placed in the detail region group, there is no button under that group to add a new row to the group. Is this a bug in JHS or have I done something wrong?
    The reason I'm using the container is that I want selective rendering of detail groups depending on the state of an item in the parent group.
    Regards
    Bar
    JDev: 10.1.3.2.0
    JHS: 10.1.3.1.26

    Bar,
    I could reproduce both problems. To fix the problem with the New button, you can change the content of the tableGroupButtons.vm template:
    #if ($JHS.page.hasDetailPageComponents || $JHS.page.hasGroupRegionPageComponents)
    <af:panelButtonBar id="${group.shortName}TableGroupButtons">
    #JHS_PARSE("NEW_BUTTON_NOT_IN_FORM_LAYOUT" ${JHS.current.model})
    </af:panelButtonBar>
    #end
    To fix the issue with the roles check, you can enter the rendered expression that is missing in the rendered property of the group region.
    Steven Davelaar,
    JHeadstart Team.

  • Use Group By on oracle

    We have to use a group by into a request from an oracle database :
    SELECT SUBSTR(ETETAFI,0,6)
    ||'0'
    ||' '
    ||' '
    ||MAX(SUBSTR(ETETAFI,13,35))
    ||RPAD(TO_CHAR(SUM(TO_NUMBER(SUBSTR(ETETAFI,48,16)))),16,' ')
    ||RPAD(TO_CHAR(SUM(TO_NUMBER(SUBSTR(ETETAFI,64,16)))),16,' ')
    ||RPAD(TO_CHAR(SUM(TO_NUMBER(SUBSTR(ETETAFI,80,16)))),16,' ')
    ||RPAD(TO_CHAR(SUM(TO_NUMBER(SUBSTR(ETETAFI,96,16)))),16,' ')
    FROM JDEDATA900.F7409FOW GROUP BY SUBSTR(ETETAFI,0,6)
    Do you know how to do that as the table JDEDATA900.F7409FOW is our source.
    Thanks.

    To use GROUP BY, when you map any column with an aggregate function, ODI will automatically generate a group by on all other columns which are mapped, but without an aggregate function.

  • Problems using Oracle Directory

    Hi all
    I have the following problem using 9i: I would like to use oracle internet directory to register my db's. I am currently reading the online handbooks and found a section that says to start the directory by using the 'oidmon' and 'oidctl' commands. The problem is that I cannot find these tools anywhere on the server, altough i am pretty sure i intalled anything important. is this a separate product? I thought it was included in 9i 9.2?
    Anyone?
    Cheers,
    Michael

    Hi.
    Hmm, your shared lib path appears to be ok. What version of Solaris are you running? Also what JDK version are you using (I'll assume you are using the one that installed with WLS)?
    You might also try posting this to the weblogic.developer.interest.jdbc newsgroup.
    Thanks,
    Michael
    Alex wrote:
    Hi,
    Please help. While trying to do a dbping, I get the following error:
    [root@hkodsdb01 SMEloan]# java -Djava.library.path=/export/home/greenwood/bea/wlserver6.0/lib/solaris:/export/home/greenwood/bea/wlserver6.0/lib/solaris/oci817_8:/u01/oracle/product/817/lib utils.dbping ORACLE oracle smeloan 192.168.1.252
    Starting Loading jDriver/Oracle .....
    Error encountered:
    java.sql.SQLException: System.loadLibrary threw java.lang.UnsatisfiedLinkError with the message '/export/home/greenwood/bea/wlserver6.0/lib/solaris/oci817_8/libweblogicoci37.so: ld.so.1: /greenwood/bea/jdk131/jre/bin/../bin/sparc/native_threads/java: fatal: libclntsh.so.8.0: open failed: No such file or directory'.
    at weblogic.jdbcbase.oci.Driver.loadLibraryIfNeeded(Driver.java:202)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:57)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at utils.dbping.main(dbping.java:167)
    The required file is under the Oracle directory specified. Also, I am having some problems with using the LD_LIBRARY_PATH for my shared library files. The command won't work with LD_LIBRARY_PATH and I must use the -Djava.library.path parameter. Any thoughts and suggestions?
    Thanks so much for your help in advance.
    Alex--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Oracle BI Answers Conditional Formatting

    Hi,
    Im using Oracle BI Answers and I am trying to set the colour conditioning function on the following graph:
    On the X axis I have company branches, on the Y axis I have sales figures. The two values that I have projected on the graph are sales figures for the current month (first bar - bar A) against sales figures of the same month last year (second bar - Bar B). My requirement is to condition the colours on Bar A so that for each branch if Bar A is equal to Bar B, the colour for Bar A should be amber, if Bar A is greater then Bar B for each branch the colour should be red and if the Bar A is less than Bar B, the colour should be green. The colour on Bar B is always grey. I tried using the "Format Chart Data" setting on the Chart, and when I try setting the condition for Bar A, the only options I am given are the numbers on the Y axis; I cant seem to set a condition for Bar A against another variable - Bar B for each of the divisions on the same chart.
    Any ideas how I can resolve that? Thank you in advance.

    Thank you very much for your suggestion. I am having difficulties with the fact that the helper column has different values for each branch/division, and the column A cannot be conditioned against the helper column as it is not a constant value, but several different values. Also, if I hide the helper column, its values would not be shown in the conditional formatting option.
    Do you have any ideas?
    Thank you in advance.

Maybe you are looking for