duplicates of the repeating group XML model
Data duplicated under Group in the model XML Extensible
My beginning and end of the group even as
<? for-each: G_EMP_RESOURCE_CODE? >
<? end foreach? >
my output
Name and first name | Code resource | Start date / time | End Date / Time | Duration |
---|---|---|---|---|
Joseph, Mr. Biju | SUPFM1489 | 25/05/2014-08:00 | 25/05/2014-10:00 | 2 |
Nery, Mr. Ernesto guardian | ELE1063 | 25/05/2014-08:00 | 25/05/2014-10:00 | 2 |
Joseph, Mr. Biju | SUPFM1489 | 25/05/2014-08:00 | 25/05/2014-10:00 | 2 |
Nery, Mr. Ernesto guardian | ELE1063 | 25/05/2014-08:00 | 25/05/2014-10:00 | 2 |
I should avoid duplication of table...
output should be only 2 rows.
Kind regards
Try this:
Open your table tag F and change as below
Tags: Business Intelligence
Similar Questions
-
Creation of numbers in the repeating groups
I try to have serial numbers in the repeating groups. The situation is that there is no serial number field in this table (in DB) to manage such a request. Can someone guide me as I am a newbie to BI Publisher.
The link to the image is [http://s833.beta.photobucket.com/user/fareed_xtreme/media/Capture-3.png.html]use
-
Force summary Sub totals on the same page as the repeating group
Hello people,
I have a group of left report where I show Patients and visits they have taken for each Department.
I then did a Sub Total of the number of visits, the Patient took. I want to assure you that the subtotal shows
upward on the same page as the data in the repeating group. I tried to use an anchor, but the report doesn't.
It gives an error: REP 1213 - reference field column to a frequency lower than his group when I have the extendable chassis anchor foot sub total
and 1814 REP report cannot be formatted. Object "Horizontal" can never fit into 'M_1' when I try to anchor the opposite effect.
My goal is to show totals of Sub (Total) on the same page as the Patient and do not go to the next page. I have attached the dotted line and Total (label and field) in one frame.
Release of the report:
Thanks in advance!Patient ID Patient Name Department Visit ====================================================================== 1001 Mary Poppins Department 001 3 Department 002 4 Department 003 1 ----------------------------- Total 8 ----------------------------- 1002 Peter Pan Department 001 2 Department 002 1 Department 003 2 ----------------------------- Total 5 -----------------------------
Pls set the property (page protect the patient details and framework that contains two sub total) to yes.
-
Sub-group under the main do not repeat group
Hi all
I have the G2 where I DOCNUM_DESCRIPTION, and I've linked G3 where I can have one or more subgroup called REASON.
Something like that
G2 - DOCNUM_DESCRIPTION
-A
B
-C
G3 - REASON N ° 1
X
Y
G3 - DESIGN 2
X
Y
Native BI, I'm able to use the repeat of group function and detail but in rtf I repeating group, and it does not repeat itself. for each docnum_description, I only get the first reason coming out not all. How can I go about it?It is difficult for me to say logical without seeing the xml and rtf model.
Can you please write me model and xml. I'm going to sed if I can help you or not.
E-mail: [email protected] -
Problem to apply conditions to the cuurent group - model of implementation of the RTF data
Hi all
Here is my example of XML data generated by the report:
< DATA >
< DT >
< CORPORATION >
Vision of < NAME > < / NAME >
< EMPLOYEE >
< EMPNO > 6 < / EMPNO >
Walker Rich < ENAME > < / ENAME >
CLERK of < JOB > < / JOB >
< SAL > 100 < / SAL >
< Dept > IT < / Dept >
< / EMPLOYEE >
< EMPLOYEE >
< EMPNO > 5 < / EMPNO >
Russ Kepel < ENAME > < / ENAME >
CLERK of < JOB > < / JOB >
< SAL > 100 < / SAL >
< Dept > ACCNT < / Dept >
< / EMPLOYEE >
< / COMPANY >
< /DT >
< Main_XML >
rowset <>
Department < and >
< Dept > IT < / Dept >
< DName > Information technology < / DName >
< Text > welcome to the Dept IT < / text >
< / Department >
< / LINES >
rowset <>
Department < and >
< Dept > ACCNT < / Dept >
Accounting < DName > < / DName >
< Text > welcome to the accounting department < / text >
< / Department >
< / LINES >
< / Main_XML >
< / DATA >
I would need to create a rtf model to display the following for all employees:
EmpNo
Ename
Job
SAL
Name of Dept
text
Here is the design of rtf, I created which is does not give me the desired result:
<? for-each-group: USED; / EMPNO? >
EMP: EMPNO
ENAME
JOB
SAL
Dept
<? for-each - group:current-group(); / Dept? >
<? If: Dept = Dept? >
DName
Text
<? end if? >
<? end for each group -? >
<? end for each group -? >
Please guide me how can I apply a condition to the previous group data in the current group. Thanks in advance.Try this:
Declare a variable external/first group
You can get rid of the second group and insert the DName field under Dept field and modify the code to include the following: ata/main_xml/rowset/department/dname[../dept="$v_dept]?"?>
Insert the text field and modify the code to include the following: ata/main_xml/rowset/department/text[../dept="$v_dept]?"?>
Thank you
BIPuser -
How get the resource group in the application model by local current-based program?
Hi all
We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.
How get the resource group in the application model by local current-based program?
We have two local unions; En and Ar.
-Resource Bundle for Arabic: ModelBundle_ar.properties
-Bundle resources for English: ModelBundle_en.properties
We try to use the code but the room below is still in English
ResourceBundleDef resourceDef = this.getResourceBundleDef ();
Settings regional locale = this.getDBTransaction () .getSession () .getLocale (); How to change the locale in the session?
Dim retVal =
StringManager.getLocalizedStringFromResourceDef (resourceDef, key,
local, NULL, null,
(false);
Also, this is the code that I use when changing the local at the bean:
Locale newLocale = new local (local);
FacesContext context = FacesContext.getCurrentInstance ();
context.getViewRoot () .setLocale (newLocale);
refreshPage();
Settings regional locale = this.getDBTransaction () .getSession () .getLocale (); How to change the locale in the session?
This will return a locale for db connection.
Instead, try with: ADFContext.getCurrent () .getLocale)
Dario
-
How to get rid of repeat groups using the query? Its my sql script.
Mr President.
worm of Oracle's 10g express edition
I want to get rid of repeating groups and wants to get result like
If my table script is as below
BEGIN -- drop tables EXECUTE IMMEDIATE 'DROP TABLE CUSTOMER'; EXECUTE IMMEDIATE 'DROP TABLE PRODUCT'; EXECUTE IMMEDIATE 'DROP TABLE SUPPLIER'; EXECUTE IMMEDIATE 'DROP TABLE PURCHASE'; EXECUTE IMMEDIATE 'DROP TABLE PURCHASELINE'; EXECUTE IMMEDIATE 'DROP TABLE SALES'; EXECUTE IMMEDIATE 'DROP TABLE SALESLINE'; EXECUTE IMMEDIATE 'DROP TABLE STOCK'; EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE(''); END; / CREATE TABLE CUSTOMER ( cust_id NUMBER NOT NULL , name VARCHAR2(50) NOT NULL , address VARCHAR2(100) DEFAULT NULL , contactno VARCHAR2(20) DEFAULT NULL , CONSTRAINT CUSTOMER_PK PRIMARY KEY ( cust_id ) ENABLE ); CREATE TABLE PRODUCT ( prod_id NUMBER NOT NULL , name VARCHAR2(50) NOT NULL , description VARCHAR2(50) DEFAULT NULL , CONSTRAINT PRODUCT_PK PRIMARY KEY ( prod_id ) ENABLE ); CREATE TABLE SUPPLIER ( suplr_id NUMBER NOT NULL , name VARCHAR2(50) NOT NULL , address VARCHAR2(100) DEFAULT NULL , contactno VARCHAR2(20) DEFAULT NULL , CONSTRAINT SUPPLIER_PK PRIMARY KEY ( suplr_id ) ENABLE ); CREATE TABLE PURCHASE ( pur_id NUMBER NOT NULL , pur_date DATE NOT NULL , suplr_id NUMBER DEFAULT '0' , CONSTRAINT PUR_SUPLR_FK FOREIGN KEY ( suplr_id ) REFERENCES SUPPLIER ( suplr_id ) , CONSTRAINT PURCHASE_PK PRIMARY KEY ( pur_id ) ENABLE ); CREATE TABLE PURCHASELINE ( pur_id NUMBER DEFAULT '0' NOT NULL , prod_id NUMBER DEFAULT '0' NOT NULL , pur_qty NUMBER DEFAULT '0' NOT NULL , unit_pur_price NUMBER DEFAULT '0' NOT NULL , CONSTRAINT PUR_LINE_PUR_FK FOREIGN KEY ( pur_id ) REFERENCES PURCHASE ( pur_id ) , CONSTRAINT PUR_LINE_POD_FK FOREIGN KEY ( prod_id ) REFERENCES PRODUCT ( prod_id ) , CONSTRAINT PUR_LINE_PK PRIMARY KEY ( pur_id,prod_id ) ENABLE ); CREATE TABLE SALES ( sal_id NUMBER NOT NULL , sal_date DATE DEFAULT NULL , cust_id NUMBER DEFAULT '0' , CONSTRAINT PUR_CUSTR_FK FOREIGN KEY ( cust_id ) REFERENCES CUSTOMER ( cust_id ) , CONSTRAINT SALES_PK PRIMARY KEY ( sal_id ) ENABLE ); CREATE TABLE SALESLINE ( sal_id NUMBER DEFAULT '0' NOT NULL , prod_id NUMBER DEFAULT '0' NOT NULL , sal_qty NUMBER DEFAULT '0' NOT NULL , unit_sal_price NUMBER DEFAULT '0' NOT NULL , CONSTRAINT SAL_LINE_SAL_FK FOREIGN KEY ( sal_id ) REFERENCES SALES ( sal_id ) , CONSTRAINT SAL_LINE_POD_FK FOREIGN KEY ( prod_id ) REFERENCES PRODUCT ( prod_id ) , CONSTRAINT SAL_LINE_PK PRIMARY KEY ( sal_id,prod_id ) ENABLE ); CREATE TABLE STOCK ( prod_id NUMBER NOT NULL , prod_qty NUMBER DEFAULT '0' NOT NULL , re_ord_level NUMBER DEFAULT '0' NOT NULL , CONSTRAINT STOCK_POD_FK FOREIGN KEY ( prod_id ) REFERENCES PRODUCT ( prod_id ) , CONSTRAINT STOCK_PK PRIMARY KEY ( prod_id ) ENABLE ); SET DEFINE OFF; -- ***** Populate Tables ***** --CUSTOMER table data INSERT INTO CUSTOMER VALUES(1,'Kamrul Hasan','Moghbazar, Dhaka','0456789123'); INSERT INTO CUSTOMER VALUES(2,'Rabiul Alam','Motijheel, Dhaka','0567891234'); INSERT INTO CUSTOMER VALUES(3,'Shahed Hasan','2-G/1,2-2,Mirpur, Dhaka','0678912345'); --PRODUCT table data INSERT INTO PRODUCT VALUES(1,'RAM',NULL); INSERT INTO PRODUCT VALUES(2,'DVD Drive',NULL); INSERT INTO PRODUCT VALUES(3,'HDD','160 GB Satta'); INSERT INTO PRODUCT VALUES(4,'Monitor','LCD 19\"'); INSERT INTO PRODUCT VALUES(5,'Printer','HP Color'); INSERT INTO PRODUCT VALUES(6,'Keyboard','Multimedia Keyborad (Customised)'); INSERT INTO PRODUCT VALUES(7,'Mouse','Customised Mouse'); -- SUPPLIER table data INSERT INTO SUPPLIER VALUES(1,'Salam Enterprise','2-H/1-10, Mirpur, Dhaka, Bangladesh','0123456789'); INSERT INTO SUPPLIER VALUES(2,'ABC Supplies','Dhanmondi, Dhaka','0234567891'); INSERT INTO SUPPLIER VALUES(3,'XYZ Company','52 Gabtali, Dhaka','0345678912'); --PURCHASE table data INSERT INTO PURCHASE VALUES(1,TO_DATE('12-12-2007','dd-mm-yyyy'),1); INSERT INTO PURCHASE VALUES(2,TO_DATE('13-12-2007','dd-mm-yyyy'),2); INSERT INTO PURCHASE VALUES(3,TO_DATE('13-12-2007','dd-mm-yyyy'),1); INSERT INTO PURCHASE VALUES(4,TO_DATE('14-12-2007','dd-mm-yyyy'),1); INSERT INTO PURCHASE VALUES(5,TO_DATE('15-12-2007','dd-mm-yyyy'),2); INSERT INTO PURCHASE VALUES(6,TO_DATE('20-12-2007','dd-mm-yyyy'),3); INSERT INTO PURCHASE VALUES(7,TO_DATE('05-01-2007','dd-mm-yyyy'),2); INSERT INTO PURCHASE VALUES(8,TO_DATE('06-05-2007','dd-mm-yyyy'),3); INSERT INTO PURCHASE VALUES(9,TO_DATE('15-07-2008','dd-mm-yyyy'),1); --PURCHASELINE table data INSERT INTO PURCHASELINE VALUES(1,1,25,900); INSERT INTO PURCHASELINE VALUES(1,2,10,1700); INSERT INTO PURCHASELINE VALUES(1,3,10,5000); INSERT INTO PURCHASELINE VALUES(1,4,9,5500); INSERT INTO PURCHASELINE VALUES(1,7,100,250); INSERT INTO PURCHASELINE VALUES(2,3,15,5000); INSERT INTO PURCHASELINE VALUES(2,6,20,500); INSERT INTO PURCHASELINE VALUES(3,6,25,450); INSERT INTO PURCHASELINE VALUES(4,7,100,200); INSERT INTO PURCHASELINE VALUES(5,5,10,3450); INSERT INTO PURCHASELINE VALUES(5,6,10,180); INSERT INTO PURCHASELINE VALUES(6,1,15,900); --SALES table data INSERT INTO SALES VALUES(1,TO_DATE('12-12-2007','dd-mm-yyyy'),2); INSERT INTO SALES VALUES(2,TO_DATE('15-12-2007','dd-mm-yyyy'),3); INSERT INTO SALES VALUES(3,TO_DATE('20-12-2007','dd-mm-yyyy'),2); INSERT INTO SALES VALUES(4,TO_DATE('28-12-2007','dd-mm-yyyy'),3); INSERT INTO SALES VALUES(5,TO_DATE('05-01-2008','dd-mm-yyyy'),1); INSERT INTO SALES VALUES(6,TO_DATE('12-01-2008','dd-mm-yyyy'),3); INSERT INTO SALES VALUES(7,TO_DATE('12-02-2008','dd-mm-yyyy'),1); INSERT INTO SALES VALUES(8,TO_DATE('12-02-2008','dd-mm-yyyy'),2); INSERT INTO SALES VALUES(9,TO_DATE('12-02-2008','dd-mm-yyyy'),3); --SALESLINE table data INSERT INTO SALESLINE VALUES(1,1,3,1000); INSERT INTO SALESLINE VALUES(1,3,1,5500); INSERT INTO SALESLINE VALUES(1,4,1,6000); INSERT INTO SALESLINE VALUES(1,6,2,500); INSERT INTO SALESLINE VALUES(1,7,2,200); INSERT INTO SALESLINE VALUES(2,2,2,1900); INSERT INTO SALESLINE VALUES(2,7,2,200); INSERT INTO SALESLINE VALUES(3,4,1,5500); INSERT INTO SALESLINE VALUES(4,2,1,2200); INSERT INTO SALESLINE VALUES(5,6,1,300); INSERT INTO SALESLINE VALUES(5,7,2,250); INSERT INTO SALESLINE VALUES(6,6,1,300); INSERT INTO SALESLINE VALUES(6,7,3,180); INSERT INTO SALESLINE VALUES(7,1,2,1000); INSERT INTO SALESLINE VALUES(7,2,1,1900); INSERT INTO SALESLINE VALUES(7,3,2,5500); INSERT INTO SALESLINE VALUES(8,4,1,5500); INSERT INTO SALESLINE VALUES(8,6,2,300); INSERT INTO SALESLINE VALUES(8,7,1,200); INSERT INTO SALESLINE VALUES(9,1,3,1000); INSERT INTO SALESLINE VALUES(9,3,2,5500); INSERT INTO SALESLINE VALUES(9,5,2,1000); --STOCK table data INSERT INTO STOCK VALUES(1,200,15); INSERT INTO STOCK VALUES(2,25,10); INSERT INTO STOCK VALUES(3,40,10); INSERT INTO STOCK VALUES(4,20,10); INSERT INTO STOCK VALUES(5,10,10); INSERT INTO STOCK VALUES(6,50,20); INSERT INTO STOCK VALUES(7,150,20); COMMIT;
Concerning
I could not figure out how you pulled your expected results, especially the last column. I guess that your problem I have several prod_id table productline / salesline. If a group of prod_id in these table should solve your problem. Something like that
SQL> select p.prod_id as product_prod_id 2 , p.name as product_name 3 , p.description as product_description 4 , s.prod_qty as stock_prod_qty 5 , s.re_ord_level as stock_re_ord_level 6 , pl.pur_qty as purchaseline_pur_qty 7 , pl.unit_pur_price as purchaseline_unit_pur_price 8 , sl.sal_qty as salesline_sal_qty 9 , sl.unit_sal_price as salesline_unit_sal_price 10 from product p 11 join stock s 12 on p.prod_id = s.prod_id 13 join ( 14 select prod_id 15 , sum(pur_qty) pur_qty 16 , sum(unit_pur_price) unit_pur_price 17 from purchaseline 18 group 19 by prod_id 20 ) pl 21 on p.prod_id = pl.prod_id 22 join ( 23 select prod_id 24 , sum(sal_qty) sal_qty 25 , sum(unit_sal_price) unit_sal_price 26 from salesline 27 group 28 by prod_id 29 ) sl 30 on p.prod_id = sl.prod_id 31 order 32 by p.prod_id; PRODUCT_PROD_ID PRODUCT_NAME PRODUCT_DESCRIPTION STOCK_PROD_QTY STOCK_RE_ORD_LEVEL PURCHASELINE_PUR_QTY PURCHASELINE_UNIT_PUR_PRICE SALESLINE_SAL_QTY SALESLINE_UNIT_SAL_PRICE --------------- -------------------- ---------------------------------------- -------------- ------------------ -------------------- --------------------------- ----------------- ------------------------ 1 RAM 200 15 40 1800 8 3000 2 DVD Drive 25 10 10 1700 4 6000 3 HDD 160 GB Satta 40 10 25 10000 5 16500 4 Monitor LCD 19\" 20 10 9 5500 3 17000 5 Printer HP Color 10 10 10 3450 2 1000 6 Keyboard Multimedia Keyborad (Customised) 50 20 55 1130 6 1400 7 Mouse Customised Mouse 150 20 200 450 10 1030 7 rows selected.
-
How to programmtically get the resource group in the model project
In the proposed model I can specify the flags of the UI for EO via EL use all resources.
Is there, is it possible programmtically get the resource group that is configured for the model project (in project property Panel) as I don't want to hardcode the path of the file.Have you tried the following as mentioned in one of the threads above? :
Assuming that the property is located in com.subbanasolutions.samples.Bundle.properties
Imports
Import oracle.javatools.resourcebundle.BundleFactory;Constants
private static final String RESOURCE_BUNDLE_NAME =
'com.subbanasolutions.samples.Bundle ';Code to access all of the resources and get a value associated with a key
ResourceBundle resourceBundle =
BundleFactory.getBundle (RESOURCE_BUNDLE_NAME);
If (resourceBundle! = null)
{
Here, FOLLOW_UP_LABEL is the key found in the resource group
String ActivityName = resourceBundle.getString ("FOLLOW_UP_LABEL");
}Thank you
Nini -
How to duplicate layers & groups without automatically add a "copy", "copy 1", "# copy" at the end of the new group.
He has been harassing me for a while now, since I often work with the same elements over and over again. His frustration of having to change the name of each layer manually, especially if I copy an entire group.
Is there a setting in Photoshop or maybe an external script that can help solve this problem for me?
See you soon,.
Qiming
You can go to the Forum script:
-
first record of the table (repeating group) is to be duplicated
Using the add-in Word RTF output to display/print order confirmation.
The first line item in the body of detail is reproduced always regardless of the method that I use.
The data are NOT duplicated in the XML input file, only in the Word output.
Software data problem bug or weird?
I'd be happy to send the little XML file.
Suggestions? Thank you!
Published by: jbiwer on May 10, 2010 10:32
This is easily duplicated. It's either a bug in BI Publisher or in the Oracle ERP that has created the XML file!
Forgive my lack of use the terms correct XML, but I noticed that if you look at the raw XML data
the creator of the XML file using the same name tag but at two different levels:
...
Name of the tag <>
...
...
... Zzzz > name of the tag < < / Tag name >
... XXXXX > name of the tag < < / Tag name >
..
..
< / tag name >
Published by: jbiwer on May 10, 2010 10:41
I forgot to mention, that if I manually change the background and all tags at the top, the first line of detail in the table data is NOT duplicated.Hi Jim,.
Your xml file is good, but the word template is wrong.
Send me the template and xml my identification number, in the profile.
-
No data found message in the BI Publisher data model?
Hello
I built a BEEP report, based on the data model.
Please advice if there is no data returned by the query, how to display an error message something like 'no data found with above settings.
Thank you
Murali.Murali
If there is no data then the generated XML will be empty of data but won't be valid. If all you need to do in the layout template is something like
No data found
where INVOICES is a repeated group waited in the data
Tim
-
Stuck in the BI Publisher rtf model for Apex report
Hi, I work on Express 4.2.3.00.08 and oracle database 11 g application.
I stuck in the BI Publisher RTF model.
I want to create a BI Publisher Apex report.
Question is.... have several activities and several Notes to a significant number.
Not sure how to put repeating frame so that all corresponding activities and corresponding notes are a major number without repeating.
Each main number arrive on a page, see the snapshot below.
I have attached my rtf model snapshot too.
I'll be really grateful for your help.
Thank you very much in advance
I think your results will have 1102 pages (one page separated by major) for all major XML data?
You must use @section. so your for each should be as below
and remove the page break before for each end.
If you can share the email I can send the updated model.
-
How to use a header column in a repeating group
I am trying to create a BEEP (11.1.1.6.2) report with an XML file as the source. XML files begin with a few header, followed by the actual data fields. For example:
< DATA >
< PARAMETERS >
Order of < P_ORDER > < / P_ORDER >
Client < P_CUSTOMER > < / P_CUSTOMER >
< / PARAMETER >
< LIST_DETAILS >
< DETAIL >
< V_ORDER > 12345 < / V_ORDER >
Oracle of < V_CUSTOMER > < / V_CUSTOMER >
< / DETAILS >
< DETAIL >
< V_ORDER > 67890 < / V_ORDER >
Microsoft < V_CUSTOMER > < / V_CUSTOMER >
< / DETAILS >
< / LIST_DETAILS >
< / DATA >
The desired output must combine a field in the Group < PARAMETERS > and < OPTION > field group in a single line. So, with the data for this example, it should look like this:
Order: 12345
Client: Oracle
Order: 67890
Client: Microsoft
In my RTF template, I created a repeating group <?-foreach: DETAIL? > and put everything in the repetition of this group. Unfortunately BEEP leaves the values for the fields in the empty < PARAMETERS > Group.
I also tried to nest two repeating groups. First: <? for each: SETTINGS? >, notes: <?-foreach: DETAIL? >. This does not solve the problem.
How can I optimize my desired output?
PaulTry
| | ----------------------------------------------------|----------------------------------- |
-
split the data belonging to the same group at two different levels
Hello
I have data in the same group I want to split into two levels.
For example: If the XML is:
< data >
Taxable < Type > < / type >
< value1 > one < / value1 >
b < value2 > < / value2 >
< / data >
< data >
Taxable < Type > < / type >
e < value1 > < / 1 >
f < value2 > < / value2 >
< / data >
< data >
Taxable < Type > < / type >
g < value1 > < / 1 >
h < value2 > < / value2 >
< / data >
< data >
Taxable < Type > < / type >
u < value1 > < / 1 >
v < value2 > < / value2 >
< / data >
< data >
Taxable < Type > < / type >
o < value1 > < / 1 >
< value2 > x < / value2 >
< / data >
The output using the RTF model should be:
Taxable
a and b
e f
g h
Not taxable
u v
l x
I can't change the query to add a group.
Kindly, if anyone can help
Published by: user10606061 on 25/06/2012 01:05
delete a table with 2 columns and two rows. In the second column of row 1
in column 2
table below
PS: your must be within a root element
-
Get duplicates in the case and Count clause in the generation of reports
Hi all
Let me explain first Base (just the Section that is in the scope of the present code) then evil go to code and my problem.i have a Set of pre-defined tasks in * 'TASK' * Table.i have a system that puts the user's request by assigning the task to their request to Request.Each will be mapped to the Instance of the task (predefined) , it will remain in a separate table * "TASK_INSTANCE" * against the user of the application id. Each task has a predefined duration.and, that their maturity date is stored in the Time Stamp data type column.
My scenario is I need to generate report based the date.report requirement is complete, I need get the number of tasks that have the date of completion as today, tomorrow and the next day they grouped based on task names.
My problem is, im getting duplicates if I used separate. It is not possible to duplicate using the join because im using Group by task nameevery record in the Task_instance table has direct relationship with the task ID. For example: im getting a line with the County satisfying the Condition and the next row with empty set.i he cannot understand why happening.need your help to understand this.
Let me add the query below,
SELECT task.task_name,
* (CASE *)
WHEN ((TRUNC (SYSDATE) - TRUNC (task_instance.ptd_pdd_date)) =
(- 1).
THEN
* (COUNT (task_instance.ptd_pdd_date)) *.
END)
AS "1_day_behind."
* (CASE *)
WHEN ((TRUNC (SYSDATE) - TRUNC (task_instance.ptd_pdd_date)) =
(- 2).
THEN
COUNT (task_instance.ptd_pdd_date)
END)
AS "2_day_behind."
* (CASE *)
WHEN ((TRUNC (SYSDATE) - TRUNC (task_instance.ptd_pdd_date)) =
(- 3).
THEN
COUNT (task_instance.ptd_pdd_date)
END)
AS "3_day_behind".
The TASK task_instance
WHERE task.task_id = task_instance.task_id
AND task_instance.status_id = 1
AND task_instance.ptd_pdd_date IS NOT NULL
GROUP BY (TRUNC (SYSDATE) - TRUNC (task_instance.ptd_pdd_date)),
Task.Task_Name;
task_instance.status_id = 1 refers to the task located in "in progress".
It's overall results (example) I get. In this area, the UI_Contact_Customer task is repeated three times. features of different in separate lines and null in the line separate .i need to avoid these duplicates.please Advisor.
__________________________________________________________________________________
TASKNAME | "1_DAY_BEHIND" | "2_DAY_BEHIND" | "3_DAY_BEHIND" |
______________________________|________________|_________________|_________________|
UI_Conduct_Fiber_Plant_Survey___ | ___ | ___ | ___ |
UI_Conduct_Site_Survey___ | ___ | ___ | ___ |
UI_ConductFiberSurvey_C___ | ___ | ___ | ___ |
UI_ConductSiteSurvey_C _ | ___ | ___ | ___ |
UI_Contact_Customer_____________|________________|_________________|_________________|
_ UI_Contact_Customer | ___10___ | ___ | ___ |
UI_Contact_Customer___ | ___ | ___ 12___ | ___ |
UI_Create_Account_Equip_C___ | ___ | ___ | ___ |
UI_Create_Account_Equipment___ | ___ | ___ | ___ |
UI_Create_CM_Ticket | | | |
______________________________|________________|_________________|_________________|
In the above result set, in particular UI_Contact_Customer task, ten of their instance with completion date tomorrow and 12 instance having the next day as the date of completion. I need to get all those as single line without duplicate.
Thank you
Jeevanand.KJeevanand K wrote:
I need to generate the report for the following scenarios
So what's the problem:
SELECT task.task_name, COUNT( CASE WHEN TRUNC(SYSDATE) - TRUNC(task_instance.ptd_pdd_date) = -1 THEN 1 END ) AS "1_day_ago", COUNT( CASE WHEN TRUNC(SYSDATE) - TRUNC(task_instance.ptd_pdd_date) = -2 THEN 1 END ) AS "2_day_ago", COUNT( CASE WHEN TRUNC(SYSDATE) - TRUNC(task_instance.ptd_pdd_date) = -3 THEN 1 END ) AS "3_day_ago", COUNT( CASE WHEN TRUNC(SYSDATE) - TRUNC(task_instance.ptd_pdd_date) = -14 THEN 1 END ) AS "2_weeks_ago", COUNT( CASE WHEN TRUNC(SYSDATE) - TRUNC(task_instance.ptd_pdd_date) < -3 THEN 1 END ) AS "more_than_4_days_ago" FROM task, task_instance WHERE task.task_id = task_instance.task_id AND task_instance.status_id = 1 GROUP BY task.task_name;
Keep in mind "more_than_4_days_ago" includes tasks as filled with "2_weeks_ago".
SY.
Maybe you are looking for
-
ENVY Phoenix Desktop - 850-065: Add the port ethernet on the desktop
I want to add a second ethernet port on the desktop... any recommendations, the Gathas, the various factors to consider... I seem to have three ports of extension on the PCI bus... one of them would be the target (or what)... any recommendations on e
-
Satellite Pro A60 - is overheating and shuts
Hello I have a problem with my A60. I start and everything goes OK. I put in a temporary monitoring software because it works for awhile and then just stop. What I see happening now, is that it will heat up to 65 then the fan comes on and at 55 it st
-
I bought the drive Flash USB Cruzer 128 GB in July 2013. It seems that it is a product of USB 2.0. Today, I plugged the Cruzer USB port of my laptop HP Probook 4540 s (Win7 SP1) 3.0 and was copy several files for a total of approximately 100 GB. The
-
Is it possible to get reports aggregates?
It's crazy that the only way to check my winnings all the days/months/etc is to run a report for every app I have and specify a date range. Is there something I'm missing that offers a simple number which was sold, and how I had to? Thank you!
-
Tunnel of IOS Interface IKE aggressive mode
I had a pen test scan on a few of my routers and she claims that IKE aggressive Mode of operation are my IOS routers. I'm having a problem to know how to disable this option in the version of IOS 12.4 (24) T. I can find it on other platforms, but not