Infobject - Text Issue in the query
Hi,
We have text loaded into an infoobject. We can see the text from the text table. But, in the query, its displaying 'Not Assigned' values for the text. The key value is getting displayed. This is a custom infoobject. It is compounded with 0PLANT.
The values in text table of XPOOL:
0PLANT XPOOL Text
100 102 Pool - 1
100
200
200 202 Pool - 2
XPOOL definition: Query Def. Filter Value Selection - Values in Master Data Table
Query Execution Filter Val. Selectn - Values in Master Data Table
In the query, in the restrict of XPOOL, i can see only
100/#
200/#
I cannot see the other 2 entries even though they are available in master data table.
Please advise.
Title edited by:
Sachin Guptha
Hi Sachin,
In you query please add the compounded characterstic at the filiter and then restrict it by the Plant <> #. or you need to bring the compounded characterstic in the rows of the query.
Hope it helps,
Cheers,
Balaji
Similar Messages
-
Exceptional aggregation on Non *** KF - Aggregation issue in the Query
Hi Gurus,
Can anyone tell me a solution for the below scenario. I am using BW 3.5 front end.
I have a non cumulative KF coming from my Stock cube and Pricing KF coming from my
Pricing Cube.(Both the cubes are in Multiprovider and my Query is on top of it).
I want to multiply both the KF's to get WSL Value CKF but my query is not at the material level
it is at the Plant level.
So it is behaving like this: for Eg: ( Remember my Qty is Non-*** KF)
QTY PRC
P1 M1 10 50
P1 M2 0 25
P1 M3 5 20
My WSL val should be 600 but it is giving me 15 * 95 which is way too high.
I have tried out all options of storing the QTY and PRC in two separate CKF and setting the aggregation
as before aggregation and then multiplying them but it din't work.
I also tried to use Exceptional Aggregation but we don't have option of ' TOTAL' as we have in BI 7.0
front end here.
So any other ideas guys. Any responses would be appreciated.
Thanks
Jay.I dont think you are able to solve this issue on the query level
This type of calculation should be done before agregation and this feature doesnt exist in BI 7.0 any longer. Any kind of exceptional aggregation wont help here
It should be be done either through virtual KF (see below ) or use stock snapshot approach
Key figure QTY*PRC should be virtual key figure. In this case U just need to one cbe (stock quantity) and pick up PRC on the query run time
QTY PRC
P1 M1 10 50
P1 M2 0 25
P1 M3 5 20 -
Query Text elements in the query
Hello all,
I have the following issue .. The multi provider has three cubes.. And the two cubes executed on 10th of this month and the other cube on 11th. The query is executed on 11th, in the text elements in the recent date it shows 10th with the last executed cubes instead it is showing 11th with the recent load of the cube... When the query is executed in the text elements for the Response date suppose to be the recent date 11th, it is showing old date 10th.. We have 7.0 system and the query and objects are 3.5 version.. please suggest me solution.
Thank you in advance.
Aryause function module READ_TEXT
FUNCTION MODULES
http://www.erpgenie.com/abap/functions.htm
http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
http://www.erpgenie.com/abap/index.htm
http://www.geocities.com/victorav15/sapr3/abapfun.html
Rewards if useful....................
Minal -
Hello,
We are facing issue with 0WBS_ELEMT, the texts of WBS element is not coming in the query. The text of these WBS elements is present in the text table.
Also, for some particular WBS elements, the report is showing texts at few places and key at the other places (in place of text).
Regards
MehaHi,
The very first thing is there is no text activation as such in BW. All the loaded text data is by default active in BW system.
Now when you say that at some places it is showing text properly and at some places it doesn't, is it happening in the same query? or in different queries, at differetn query level you can check the key and text settings maintained across multiple queries.
Few important things which you can check are,
1) Required text data for particular WBS is loaded in text table in specified format i.e. Language and text type (Short, medium, Long). Language is also equally important.
2) Check the primary key in your text table and see if any compounding is maintained.
Regards,
Durgesh. -
How to hide Text Variable in the Query title
Hi guys,
here again in a very easy pratical issue.
I need to insert a text variable in a report title.
The variable is updated with an exit and the text is get once the query is executed. This works fine.
My problem is that in report selection (so opening the query and between queries available for an Infoprovider) I see the tech variable name of the query. Do you know if there is a method to hide the variable or if it is possible to valorize it when the report title in the report selection is displayed?
Thanks in advance
Bye!Hi, thanks for your answer.
Also SAP marks this as a limitation.
Bye! -
Hi All,
Please let me know me the issue in the select query given below.
SELECT avbeln aroute alifsk bwbstk c~werks
FROM likp AS a
JOIN vbuk AS b
JOIN lips AS c
ON avbeln = bvbeln
AND avbeln = cvbeln
INTO TABLE i_likp_temp
FOR ALL ENTRIES IN i_xvttp_tab
WHERE a~vbeln = i_xvttp_tab-vbeln.
Regards,
SharadenduVTTP-VBELN = Delivery
LIKP-VBELN & LIPS-VBELN = Delivery
whereas VBUK-VBELN is the sales document.
You are trying to compare a delivery with a sales order I guess hence your query doesnt work. -
Hi Friends,
I am having a problem with this query. The query is to fetch all the elements for the employees. The elements that need to be fetched are set up in the flex sets.
In the table fnd_flex_values there are columns start_date_active and end_date_active fields and these are null. In the below query when I use the condition
and trunc(sysdate) between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
the query fetches the results in 5seconds
but when I replace the same query with the statement
and to_date(to_char(ppa.date_earned,'DD-MON-YYYY'),'DD-MON-YYYY') between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
the query takes a lot of time. Infact it gets timed out
Columns start_date_active and end_date_active fields are date type. Can anyone say what is the issue with this query
When I give the sysdate instead of ppa.date_earned date
select papf.person_id, papf.full_name, papf.employee_number
,petf.element_name, pivf.name,
prrv.result_value, ppa.date_earned,ppa.effective_date, to_char(ppa.date_earned,'DD-MON-YYYY') date_earned, paaf.assignment_id, petf.effective_start_date
,petf.effective_end_date, ffv.*
from per_all_people_f papf
,per_all_assignments_f paaf
,pay_payroll_actions ppa
,pay_assignment_actions paa
,pay_element_types_f petf
,pay_input_values_f pivf
,pay_run_results prr
,pay_run_result_values prrv
,per_person_type_usages_f pptuf
,per_person_types ppt
,fnd_flex_values ffv
,fnd_flex_value_sets ffvs
where 1=1
and papf.person_id = paaf.person_id
and trunc(ppa.date_earned) between trunc(papf.effective_start_date) and trunc(papf.effective_end_date)
and trunc(ppa.date_earned) between trunc(paaf.effective_start_date) and trunc(paaf.effective_end_date)
and paa.assignment_id = paaf.assignment_id
and paa.action_status='C'
and ppa.payroll_id = 61
--and ppa.consolidation_set_id = 108
and ppa.payroll_action_id = paa.payroll_action_id
and prr.assignment_action_id = paa.assignment_action_id
and prr.element_type_id = petf.element_type_id
-- and trunc(ppa.date_earned) between trunc(petf.effective_start_date) and trunc(petf.effective_end_date)
and trunc(sysdate) between petf.effective_start_date and petf.effective_end_date
and prrv.run_result_id = prr.run_result_id
and prrv.input_value_id = pivf.input_value_id
and prr.status in ('P','PA')
and pivf.name ='Pay Value'
and ppa.date_earned between pivf.effective_start_date and pivf.effective_end_date
and ppa.time_period_id=145
and paaf.person_id = pptuf.person_id
and pptuf.person_type_id = ppt.person_type_id
and ppt.user_person_type = nvl('Employee',ppt.user_person_type)
and trunc(ppa.date_earned) between pptuf.effective_start_date and pptuf.effective_end_date
and petf.element_name = ffv.flex_value
and ffv.flex_value_set_id = ffvs.flex_value_set_id
and ffv.enabled_flag ='Y'
and ffvs.flex_value_set_name='GROUP_ELEMENTS'
and trunc(sysdate) between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and NVL(ffv.end_Date_active,TO_DATE('31-DEC-4712','DD-MON-YYYY'))
-- and trunc(ppa.effective_date) between nvl(ffv.start_Date_active,trunc(ppa.effective_date)) and NVL(ffv.end_Date_active,trunc(ppa.effective_date))
-- and to_date(to_char(ppa.date_earned,'DD-MON-YYYY'),'DD-MON-YYYY') between NVL(ffv.start_Date_active,TO_DATE('01-JAN-1951','DD-MON-YYYY')) and
order by ffv.parent_flex_value_low, papf.employee_number;
Thanksʃʃp wrote:
/* Formatted on 2012/06/11 13:34 (Formatter Plus v4.8.8) */
SELECT DISTINCT fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_ir, no_of_supps_start_ir
FROM comm_exst_rp_comit_aggr_irview
WHERE fr_ir_code = 'AS01'
AND srta_period = 2
AND srta_year = 2011
AND param_rep_prd = '2011-2'
AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 1, 1)
GROUP BY fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_ir, no_of_supps_start_ir
UNION
SELECT DISTINCT fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_irda AS no_of_links_start_ir,
no_of_supps_start__irda AS no_of_supps_start_ir
FROM comm_exst_rp_comit_aggr_irview
WHERE fr_ir_code = 'AS01'
AND srta_period = 2
AND srta_year = 2011
AND param_rep_prd = '2011-2'
AND da_status = 'N'
AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 0, 0)
GROUP BY fr_ir_code, fr_fc_code1, product1, param_rep_prd, no_of_links_start_irda, no_of_supps_start__irdaYes Union is one of the best solutions for handling two queries.
As per my understanding DECODE function use is:
DECODE (value,<if this value>,<return this value>,
<if this value>,<return this value>,
<otherwise this value>)
But I am little bit jumbled for understanding below two lines in the query..
1)
AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 1, 1)
2)
AND DECODE (:bind_variable, 'All', 1, 0) = DECODE (:bind_variable, 'All', 0, 0)Can you please tell me how the comparision is done using DECODE function? -
Hi Experts,
I have issue with the text, actually at the SO header we maintain text,but It is carried to the Item delivery, which should not happen,
Please can you guide me how we get the header text to Item text, what would be causes, how should I rectify that,
how to check if the delivery Item text config was changed.
Pls advise
ThanksHi,
Relation is like this
Sales order header text will copy to delivery header text
sales order item text will copy to delivery item text
Not header text to item text. check the access sequence in VOTXN
Kapil -
Performance issue of the query
Hi All,
Please help me to avoid sequential access on the table VBAK.
as i am using this query on VBAK,VBUK,VBPA and VBFA.
the query as follows.
How to improve the performance of this query,its very urgent please give me the sample query if possible.
SELECT a~vbeln
a~erdat
a~ernam
a~vkorg
a~vkbur
a~kunnr
b~kunnr AS kunnr_shp
b~adrnr
c~gbstk
c~fkstk
d~vbeln AS vbeln_i
INTO CORRESPONDING FIELDS OF TABLE t_z92sales
FROM vbak AS a INNER JOIN vbuk AS c ON avbeln = cvbeln
INNER JOIN vbpa AS b ON avbeln = bvbeln
AND bposnr = 0 AND bparvw = 'WE'
LEFT OUTER JOIN vbfa AS d ON avbeln = dvbelv AND d~vbtyp_n = 'M'
WHERE ( a~vbeln BETWEEN fvbeln AND tvbeln )
AND a~vbtyp = 'C'
AND a~vkorg IN vkorg_s
AND c~gbstk IN gbstk_s.Hi Ramada,
Try using the following code.
RANGES: r_vbeln FOR vbka-vbeln.
DATA: w_index TYPE sy-tabix,
BEGIN OF t_vbak OCCURS 0,
vbeln TYPE vbak-vbeln,
erdat TYPE vbak-erdat,
ernam TYPE vbak-ernam,
vkorg TYPE vbak-vkorg,
vkbur TYPE vbak-vkbur,
kunnr TYPE vbak-kunnr,
del(1) TYPE c ,
END OF t_vbak,
BEGIN OF t_vbuk OCCURS 0,
vbeln TYPE vbuk-vbeln,
gbstk TYPE vbuk-gbstk,
fkstk TYPE vbuk-fkstk,
END OF t_vbuk,
BEGIN OF t_vbpa OCCURS 0,
vbeln TYPE vbpa-vbeln,
kunnr TYPE vbpa-kunnr,
adrnr TYPE vbpa-adrnr,
END OF t_vbpa,
BEGIN OF t_vbfa OCCURS 0,
vbelv TYPE vbfa-vbelv,
vbeln TYPE vbfa-vbeln,
END OF t_vbfa,
BEGIN OF t_z92sales OCCURS 0,
vbeln TYPE vbak-vbeln,
erdat TYPE vbak-erdat,
ernam TYPE vbak-ernam,
vkorg TYPE vbak-vkorg,
vkbur TYPE vbak-vkbur,
kunnr TYPE vbak-kunnr,
gbstk TYPE vbuk-gbstk,
fkstk TYPE vbuk-fkstk,
kunnr_shp TYPE vbpa-kunnr,
adrnr TYPE vbpa-adrnr,
vbeln_i TYPE vbfa-vbeln,
END OF t_z92sales.
IF NOT fvbeln IS INITIAL
OR NOT tvbeln IS INITIAL.
REFRESH r_vbeln.
r_vbeln-sign = 'I'.
IF fvbeln IS INITIAL.
r_vbeln-option = 'EQ'.
r_vbeln-low = tvbeln.
ELSEIF tvbeln IS INITIAL.
r_vbeln-option = 'EQ'.
r_vbeln-low = fvbeln.
ELSE.
r_vbeln-option = 'BT'.
r_vbeln-low = fvbeln.
r_vbeln-high = tvbeln.
ENDIF.
APPEND r_vbeln.
CLEAR r_vbeln.
SELECT vbeln
erdat
ernam
vkorg
vkbur
kunnr
FROM vbak
INTO TABLE t_vbak
WHERE vbeln IN r_vbeln
AND vbtyp EQ 'C'
AND vkorg IN vkorg_s.
IF sy-subrc EQ 0.
SORT t_vbak BY vbeln.
SELECT vbeln
gbstk
fkstk
FROM vbuk
INTO TABLE t_vbuk
FOR ALL ENTRIES IN t_vbak
WHERE vbeln EQ t_vbak-vbeln
AND gbstk IN gbstk_s.
IF sy-subrc EQ 0.
SORT t_vbuk BY vbeln.
LOOP AT t_vbak.
w_index = sy-tabix.
READ TABLE t_vbuk WITH KEY vbeln = t_vbak-vbeln
BINARY SEARCH
TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
t_vbak-del = 'X'.
MODIFY t_vbak INDEX w_index TRANSPORTING del.
ENDIF.
ENDLOOP.
DELETE t_vbak WHERE del EQ 'X'.
ENDIF.
ENDIF.
ELSE.
SELECT vbeln
gbstk
fkstk
FROM vbuk
INTO TABLE t_vbuk
WHERE vbtyp EQ 'C'
AND gbstk IN gbstk_s.
IF sy-subrc EQ 0.
SORT t_vbuk BY vbeln.
SELECT vbeln
erdat
ernam
vkorg
vkbur
kunnr
FROM vbak
INTO TABLE t_vbak
FOR ALL ENTRIES IN t_vbuk
WHERE vbeln EQ t_vbuk-vbeln
AND vkorg IN vkorg_s.
IF sy-subrc EQ 0.
SORT t_vbak BY vbeln.
ENDIF.
ENDIF.
ENDIF.
IF NOT t_vbak[] IS INITIAL.
SELECT vbeln
kunnr
adrnr
FROM vbpa
INTO TABLE t_vbpa
FOR ALL ENTRIES IN t_vbak
WHERE vbeln EQ t_vbak-vbeln
AND posnr EQ '000000'
AND parvw EQ 'WE'.
IF sy-subrc EQ 0.
SORT t_vbpa BY vbeln.
SELECT vbelv
vbeln
FROM vbfa
INTO TABLE t_vbfa
FOR ALL ENTRIES IN t_vbpa
WHERE vbelv EQ t_vbpa-vbeln
AND vbtyp_n EQ 'M'.
IF sy-subrc EQ 0.
SORT t_vbfa BY vbelv.
ENDIF.
ENDIF.
ENDIF.
REFRESH t_z92sales.
LOOP AT t_vbak.
READ TABLE t_vbuk WITH KEY vbeln = t_vbak-vbeln
BINARY SEARCH
TRANSPORTING
gbstk
fkstk.
IF sy-subrc EQ 0.
READ TABLE t_vbpa WITH KEY vbeln = t_vbak-vbeln
BINARY SEARCH
TRANSPORTING
kunnr
adrnr.
IF sy-subrc EQ 0.
READ TABLE t_vbfa WITH KEY vbelv = t_vbak-vbeln
BINARY SEARCH
TRANSPORTING
vbeln.
IF sy-subrc EQ 0.
t_z92sales-vbeln = t_vbak-vbeln.
t_z92sales-erdat = t_vbak-erdat.
t_z92sales-ernam = t_vbak-ernam.
t_z92sales-vkorg = t_vbak-vkorg.
t_z92sales-vkbur = t_vbak-vkbur.
t_z92sales-kunnr = t_vbak-kunnr.
t_z92sales-gbstk = t_vbuk-gbstk.
t_z92sales-fkstk = t_vbuk-fkstk.
t_z92sales-kunnr_shp = t_vbpa-kunnr.
t_z92sales-adrnr = t_vbpa-adrnr.
t_z92sales-vbeln_i = t_vbfa-vbeln.
APPEND t_z92sales.
CLEAR t_z92sales.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP. -
Performance Issue with the query
Hi Experts,
While working on peoplesoft, today I was stuck with a problem when one of the Query is performing really bad. With all the statistics updates, query is not performing good. On one of the table, query is spending time doing lot of IO. (db file sequential read wait). And if I delete the stats for the table and let dynamic sampling to take place, query just works good and there is no IO wait on the table.
Here is the query
SELECT A.BUSINESS_UNIT_PC, A.PROJECT_ID, E.DESCR, A.EMPLID, D.NAME, C.DESCR, A.TRC,
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 1, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 2, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 3, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 4, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 5, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 6, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 7, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 8, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 9, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 10, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 11, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 12, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 13, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 14, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 15, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 16, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 17, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 18, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 19, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 20, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 21, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 22, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 23, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 24, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 25, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 26, 'DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 27, 'MM-DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 28, 'MM-DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 29, 'MM-DD'), A.TL_QUANTITY, 0)),
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 30, 'MM-DD'), A.TL_QUANTITY, 0)),
SUM( A.EST_GROSS),
DECODE( A.TRC, 'ROVA1', 0, 'ROVA2', 0, ( SUM( A.EST_GROSS)/100) * 9.75),
'2012-07-01',
'2012-07-31',
SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 1, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 2, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 3, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 4, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 5, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 6, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 7, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 8, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 9, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 10, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 11, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 12, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 13, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 14, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 15, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 16, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 17, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 18, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 19, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 20, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 21, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 22, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 23, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 24, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 25, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 26, 'DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 27, 'MM-DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 28, 'MM-DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 29, 'MM-DD'), A.TL_QUANTITY, 0) +
DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 30, 'MM-DD'), A.TL_QUANTITY, 0)
DECODE( A.CURRENCY_CD, 'USD', '$', 'GBP', '£', 'EUR', '€', 'AED', 'D', 'NGN', 'N', ' '),
DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'NG', F.PER_ORG),
DECODE(TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'MM'),
TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'MM'),
TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'Mon ')
|| TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'YYYY'), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'Mon ')
|| TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'YYYY') || ' / ' || TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'Mon ')
|| TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'YYYY')),
C.TRC, TO_CHAR(C.EFFDT,'YYYY-MM-DD'),
E.BUSINESS_UNIT,
E.PROJECT_ID
FROM
PS_TL_PAYABLE_TIME A,
PS_TL_TRC_TBL C,
PS_PROJECT E,
PS_PERSONAL_DATA D,
PS_PERALL_SEC_QRY D1,
PS_JOB F,
PS_EMPLMT_SRCH_QRY F1
WHERE
D.EMPLID = D1.EMPLID
AND D1.OPRID = 'TMANI'
AND F.EMPLID = F1.EMPLID
AND F.EMPL_RCD = F1.EMPL_RCD
AND F1.OPRID = 'TMANI'
AND A.DUR BETWEEN TO_DATE('2012-07-01','YYYY-MM-DD') AND TO_DATE('2012-07-31','YYYY-MM-DD')
AND C.TRC = A.TRC
AND C.EFFDT = (SELECT
MAX(C_ED.EFFDT)
FROM
PS_TL_TRC_TBL C_ED
WHERE
C.TRC = C_ED.TRC
AND C_ED.EFFDT <= SYSDATE
AND E.BUSINESS_UNIT = A.BUSINESS_UNIT_PC
AND E.PROJECT_ID = A.PROJECT_ID
AND A.EMPLID = D.EMPLID
AND A.EMPLID = F.EMPLID
AND A.EMPL_RCD = F.EMPL_RCD
AND F.EFFDT = (SELECT
MAX(F_ED.EFFDT)
FROM
PS_JOB F_ED
WHERE
F.EMPLID = F_ED.EMPLID
AND F.EMPL_RCD = F_ED.EMPL_RCD
AND F_ED.EFFDT <= SYSDATE
AND F.EFFSEQ = (SELECT
MAX(F_ES.EFFSEQ)
FROM
PS_JOB F_ES
WHERE
F.EMPLID = F_ES.EMPLID
AND F.EMPL_RCD = F_ES.EMPL_RCD
AND F.EFFDT = F_ES.EFFDT
AND F.GP_PAYGROUP = DECODE(' ', ' ', F.GP_PAYGROUP, ' ')
AND A.CURRENCY_CD = DECODE(' ', ' ', A.CURRENCY_CD, ' ')
AND DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'L', DECODE( F.PER_ORG, 'CWR', 'L', 'E')) = DECODE(' ', ' ', DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'L', DECODE( F.PER_ORG, 'CWR', 'L', 'E')), 'L', 'L', 'E', 'E', 'A', DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'L', DECODE( F.PER_ORG, 'CWR', 'L', 'E')))
AND ( A.EMPLID, A.EMPL_RCD) IN (SELECT
B.EMPLID,
B.EMPL_RCD
FROM
PS_TL_GROUP_DTL B
WHERE
B.TL_GROUP_ID = DECODE('ER012', ' ', B.TL_GROUP_ID, 'ER012')
AND E.PROJECT_USER1 = DECODE(' ', ' ', E.PROJECT_USER1, ' ')
AND A.PROJECT_ID = DECODE(' ', ' ', A.PROJECT_ID, ' ')
AND A.PAYABLE_STATUS <>
CASE
WHEN to_number(TO_CHAR(sysdate, 'DD')) < 15
THEN
CASE
WHEN A.DUR > last_day(add_months(sysdate, -2))
THEN ' '
ELSE 'NA'
END
ELSE
CASE
WHEN A.DUR > last_day(add_months(sysdate, -1))
THEN ' '
ELSE 'NA'
END
END
AND A.EMPLID = DECODE(' ', ' ', A.EMPLID, ' ')
GROUP BY A.BUSINESS_UNIT_PC,
A.PROJECT_ID,
E.DESCR,
A.EMPLID,
D.NAME,
C.DESCR,
A.TRC,
'2012-07-01',
'2012-07-31',
DECODE( A.CURRENCY_CD, 'USD', '$', 'GBP', '£', 'EUR', '€', 'AED', 'D', 'NGN', 'N', ' '),
DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'NG', F.PER_ORG),
DECODE(TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'MM'), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'MM'), TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'Mon ')
|| TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'YYYY'), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'Mon ')
|| TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'YYYY') || ' / '
|| TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'Mon ') || TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'YYYY')),
C.TRC, TO_CHAR(C.EFFDT,'YYYY-MM-DD'),
E.BUSINESS_UNIT, E.PROJECT_ID
HAVING SUM( A.EST_GROSS) <> 0
ORDER BY 1,
2,
5,
6 ;Here is the screenshot for IO wait
[https://lh4.googleusercontent.com/-6PFW2FSK3yE/UCrwUbZ0pvI/AAAAAAAAAPA/eHM48AOC0Uo]
Edited by: Oceaner on Aug 14, 2012 5:38 PMHere is the execution plan with all the statistics present
PLAN_TABLE_OUTPUT
Plan hash value: 1575300420
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 237 | 2703 (1)| 00:00:33 |
|* 1 | FILTER | | | | | |
| 2 | SORT GROUP BY | | 1 | 237 | | |
| 3 | CONCATENATION | | | | | |
|* 4 | FILTER | | | | | |
|* 5 | FILTER | | | | | |
|* 6 | HASH JOIN | | 1 | 237 | 1695 (1)| 00:00:21 |
|* 7 | HASH JOIN | | 1 | 204 | 1689 (1)| 00:00:21 |
|* 8 | HASH JOIN SEMI | | 1 | 193 | 1352 (1)| 00:00:17 |
| 9 | NESTED LOOPS | | | | | |
| 10 | NESTED LOOPS | | 1 | 175 | 1305 (1)| 00:00:16 |
|* 11 | HASH JOIN | | 1 | 148 | 1304 (1)| 00:00:16 |
| 12 | JOIN FILTER CREATE | :BF0000 | | | | |
| 13 | NESTED LOOPS | | | | | |
| 14 | NESTED LOOPS | | 1 | 134 | 967 (1)| 00:00:12 |
| 15 | NESTED LOOPS | | 1 | 103 | 964 (1)| 00:00:12 |
|* 16 | TABLE ACCESS FULL | PS_PROJECT | 197 | 9062 | 278 (1)| 00:00:04 |
|* 17 | TABLE ACCESS BY INDEX ROWID | PS_TL_PAYABLE_TIME | 1 | 57 | 7 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN | IDX$$_C44D0007 | 16 | | 3 (0)| 00:00:01 |
|* 19 | INDEX RANGE SCAN | IDX$$_3F450003 | 1 | | 2 (0)| 00:00:01 |
|* 20 | TABLE ACCESS BY INDEX ROWID | PS_JOB | 1 | 31 | 3 (0)| 00:00:01 |
| 21 | VIEW | PS_EMPLMT_SRCH_QRY | 5428 | 75992 | 336 (2)| 00:00:05 |
PLAN_TABLE_OUTPUT
| 22 | SORT UNIQUE | | 5428 | 275K| 336 (2)| 00:00:05 |
|* 23 | FILTER | | | | | |
| 24 | JOIN FILTER USE | :BF0000 | 55671 | 2827K| 335 (1)| 00:00:05 |
| 25 | NESTED LOOPS | | 55671 | 2827K| 335 (1)| 00:00:05 |
| 26 | TABLE ACCESS BY INDEX ROWID| PSOPRDEFN | 1 | 20 | 2 (0)| 00:00:01 |
|* 27 | INDEX UNIQUE SCAN | PS_PSOPRDEFN | 1 | | 1 (0)| 00:00:01 |
|* 28 | TABLE ACCESS FULL | PS_SJT_PERSON | 55671 | 1739K| 333 (1)| 00:00:04 |
| 29 | CONCATENATION | | | | | |
| 30 | NESTED LOOPS | | 1 | 63 | 2 (0)| 00:00:01 |
|* 31 | INDEX FAST FULL SCAN | PSASJT_OPR_CLS | 1 | 24 | 2 (0)| 00:00:01 |
|* 32 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 33 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|* 34 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|* 35 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 36 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|* 37 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|* 38 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
|* 39 | INDEX UNIQUE SCAN | PS_PERSONAL_DATA | 1 | | 0 (0)| 00:00:01 |
| 40 | TABLE ACCESS BY INDEX ROWID | PS_PERSONAL_DATA | 1 | 27 | 1 (0)| 00:00:01 |
|* 41 | INDEX FAST FULL SCAN | PS_TL_GROUP_DTL | 323 | 5814 | 47 (3)| 00:00:01 |
| 42 | VIEW | PS_PERALL_SEC_QRY | 7940 | 87340 | 336 (2)| 00:00:05 |
| 43 | SORT UNIQUE | | 7940 | 379K| 336 (2)| 00:00:05 |
|* 44 | FILTER | | | | | |
|* 45 | FILTER | | | | | |
| 46 | NESTED LOOPS | | 55671 | 2663K| 335 (1)| 00:00:05 |
| 47 | TABLE ACCESS BY INDEX ROWID | PSOPRDEFN | 1 | 20 | 2 (0)| 00:00:01 |
|* 48 | INDEX UNIQUE SCAN | PS_PSOPRDEFN | 1 | | 1 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|* 49 | TABLE ACCESS FULL | PS_SJT_PERSON | 55671 | 1576K| 333 (1)| 00:00:04 |
| 50 | CONCATENATION | | | | | |
| 51 | NESTED LOOPS | | 1 | 63 | 2 (0)| 00:00:01 |
|* 52 | INDEX FAST FULL SCAN | PSASJT_OPR_CLS | 1 | 24 | 2 (0)| 00:00:01 |
|* 53 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 54 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|* 55 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|* 56 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 57 | CONCATENATION | | | | | |
| 58 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|* 59 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|* 60 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 61 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|* 62 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|* 63 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 64 | NESTED LOOPS | | 1 | 63 | 3 (0)| 00:00:01 |
| 65 | INLIST ITERATOR | | | | | |
|* 66 | INDEX RANGE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 2 (0)| 00:00:01 |
|* 67 | INDEX RANGE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
| 68 | TABLE ACCESS FULL | PS_TL_TRC_TBL | 922 | 30426 | 6 (0)| 00:00:01 |
| 69 | SORT AGGREGATE | | 1 | 20 | | |
|* 70 | INDEX RANGE SCAN | PSAJOB | 1 | 20 | 3 (0)| 00:00:01 |
| 71 | SORT AGGREGATE | | 1 | 14 | | |
|* 72 | INDEX RANGE SCAN | PS_TL_TRC_TBL | 2 | 28 | 2 (0)| 00:00:01 |
| 73 | SORT AGGREGATE | | 1 | 23 | | |
|* 74 | INDEX RANGE SCAN | PSAJOB | 1 | 23 | 3 (0)| 00:00:01 |
|* 75 | FILTER | | | | | |
PLAN_TABLE_OUTPUT
|* 76 | FILTER | | | | | |
|* 77 | HASH JOIN | | 1 | 237 | 974 (2)| 00:00:12 |
|* 78 | HASH JOIN | | 1 | 226 | 637 (1)| 00:00:08 |
|* 79 | HASH JOIN | | 1 | 193 | 631 (1)| 00:00:08 |
| 80 | NESTED LOOPS | | | | | |
| 81 | NESTED LOOPS | | 1 | 179 | 294 (1)| 00:00:04 |
| 82 | NESTED LOOPS | | 1 | 152 | 293 (1)| 00:00:04 |
| 83 | NESTED LOOPS | | 1 | 121 | 290 (1)| 00:00:04 |
|* 84 | HASH JOIN SEMI | | 1 | 75 | 289 (1)| 00:00:04 |
|* 85 | TABLE ACCESS BY INDEX ROWID | PS_TL_PAYABLE_TIME | 1 | 57 | 242 (0)| 00:00:03 |
|* 86 | INDEX SKIP SCAN | IDX$$_C44D0007 | 587 | | 110 (0)| 00:00:02 |
|* 87 | INDEX FAST FULL SCAN | PS_TL_GROUP_DTL | 323 | 5814 | 47 (3)| 00:00:01 |
|* 88 | TABLE ACCESS BY INDEX ROWID | PS_PROJECT | 1 | 46 | 1 (0)| 00:00:01 |
|* 89 | INDEX UNIQUE SCAN | PS_PROJECT | 1 | | 0 (0)| 00:00:01 |
|* 90 | TABLE ACCESS BY INDEX ROWID | PS_JOB | 1 | 31 | 3 (0)| 00:00:01 |
|* 91 | INDEX RANGE SCAN | IDX$$_3F450003 | 1 | | 2 (0)| 00:00:01 |
|* 92 | INDEX UNIQUE SCAN | PS_PERSONAL_DATA | 1 | | 0 (0)| 00:00:01 |
| 93 | TABLE ACCESS BY INDEX ROWID | PS_PERSONAL_DATA | 1 | 27 | 1 (0)| 00:00:01 |
| 94 | VIEW | PS_EMPLMT_SRCH_QRY | 5428 | 75992 | 336 (2)| 00:00:05 |
| 95 | SORT UNIQUE | | 5428 | 275K| 336 (2)| 00:00:05 |
|* 96 | FILTER | | | | | |
| 97 | NESTED LOOPS | | 55671 | 2827K| 335 (1)| 00:00:05 |
| 98 | TABLE ACCESS BY INDEX ROWID | PSOPRDEFN | 1 | 20 | 2 (0)| 00:00:01 |
|* 99 | INDEX UNIQUE SCAN | PS_PSOPRDEFN | 1 | | 1 (0)| 00:00:01 |
|*100 | TABLE ACCESS FULL | PS_SJT_PERSON | 55671 | 1739K| 333 (1)| 00:00:04 |
| 101 | CONCATENATION | | | | | |
| 102 | NESTED LOOPS | | 1 | 63 | 2 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|*103 | INDEX FAST FULL SCAN | PSASJT_OPR_CLS | 1 | 24 | 2 (0)| 00:00:01 |
|*104 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 105 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|*106 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|*107 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 108 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|*109 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|*110 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 111 | TABLE ACCESS FULL | PS_TL_TRC_TBL | 922 | 30426 | 6 (0)| 00:00:01 |
| 112 | VIEW | PS_PERALL_SEC_QRY | 7940 | 87340 | 336 (2)| 00:00:05 |
| 113 | SORT UNIQUE | | 7940 | 379K| 336 (2)| 00:00:05 |
|*114 | FILTER | | | | | |
|*115 | FILTER | | | | | |
| 116 | NESTED LOOPS | | 55671 | 2663K| 335 (1)| 00:00:05 |
| 117 | TABLE ACCESS BY INDEX ROWID | PSOPRDEFN | 1 | 20 | 2 (0)| 00:00:01 |
|*118 | INDEX UNIQUE SCAN | PS_PSOPRDEFN | 1 | | 1 (0)| 00:00:01 |
|*119 | TABLE ACCESS FULL | PS_SJT_PERSON | 55671 | 1576K| 333 (1)| 00:00:04 |
| 120 | CONCATENATION | | | | | |
| 121 | NESTED LOOPS | | 1 | 63 | 2 (0)| 00:00:01 |
|*122 | INDEX FAST FULL SCAN | PSASJT_OPR_CLS | 1 | 24 | 2 (0)| 00:00:01 |
|*123 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 124 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|*125 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|*126 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 127 | CONCATENATION | | | | | |
| 128 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|*129 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|*130 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 131 | NESTED LOOPS | | 1 | 63 | 1 (0)| 00:00:01 |
|*132 | INDEX UNIQUE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
|*133 | INDEX UNIQUE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 0 (0)| 00:00:01 |
| 134 | NESTED LOOPS | | 1 | 63 | 3 (0)| 00:00:01 |
| 135 | INLIST ITERATOR | | | | | |
|*136 | INDEX RANGE SCAN | PSASJT_CLASS_ALL | 1 | 39 | 2 (0)| 00:00:01 |
|*137 | INDEX RANGE SCAN | PSASJT_OPR_CLS | 1 | 24 | 1 (0)| 00:00:01 |
| 138 | SORT AGGREGATE | | 1 | 20 | | |
|*139 | INDEX RANGE SCAN | PSAJOB | 1 | 20 | 3 (0)| 00:00:01 |
| 140 | SORT AGGREGATE | | 1 | 14 | | |
|*141 | INDEX RANGE SCAN | PS_TL_TRC_TBL | 2 | 28 | 2 (0)| 00:00:01 |
| 142 | SORT AGGREGATE | | 1 | 23 | | |
|*143 | INDEX RANGE SCAN | PSAJOB | 1 | 23 | 3 (0)| 00:00:01 |
| 144 | SORT AGGREGATE | | 1 | 14 | | |
|*145 | INDEX RANGE SCAN | PS_TL_TRC_TBL | 2 | 28 | 2 (0)| 00:00:01 |
| 146 | SORT AGGREGATE | | 1 | 20 | | |
|*147 | INDEX RANGE SCAN | PSAJOB | 1 | 20 | 3 (0)| 00:00:01 |
| 148 | SORT AGGREGATE | | 1 | 23 | | |
|*149 | INDEX RANGE SCAN | PSAJOB | 1 | 23 | 3 (0)| 00:00:01 |
------------------------------------------------------------------------------------------------------------------Most of the IO wait occur at step 17. Though exlain plan simply doesnot show this thing..But when we run this query from Peoplesoft application (online page), this is visible through Grid control SQL Monitoring
Second part of the Question continues.... -
Hi,
I have the following data in my single table CHILD_ID PARENT_ID
ASD0l12eds ASD0l12edn
ASD0l58ppo ASD0l16uui
ASD0l17jji ASD0l19nnk
ASD0l12edm ASD0l12edn
ASD0l19dds ASD0l12edn
ASD0l16tdp ASD0l16uui
ASD0l10kko ASD0l16uui
My Requirement :-
I want to fetch all the data i.e. child records based on the
PARENT_ID provided.
putting it in simple words, i want to iterate the table to get all the
child records which are related to that particular PARENT_ID
then
need to hold that ouput in a variable and
put a counter (which will hold total no. of rows accumulated)
then
will delete all the records and will set counter value to 0.
Expected Result :-
CHILD_ID PARENT_ID
ASD0l12eds ASD0l12edn
ASD0l12edm ASD0l12edn
ASD0l19dds ASD0l12edn
ASD0l17jji ASD0l19nnk
ASD0l58ppo ASD0l16uui
ASD0l16tdp ASD0l16uui
ASD0l10kko ASD0l16uui
WHAT I DID :-
I built the below query and ran it:-
SELECT M.CHILD_ID,M.PARENT_ID, CONNECT_BY_ISLEAF AS NO_CHILDREN_EXIST
FROM MY_EX_TABLE M
START WITH PARENT_ID = 'ASD0l16uui'
CONNECT BY PARENT_ID = 'ASD0l16uui' ;
WHAT I GOT (ACTUAL RESULT) :-
CHILD_ID PARENT_ID NO_CHILDREN_EXIST ASD0l17jji ASD0l19nnk 0
ASD0l17jji ASD0l19nnk 0
ASD0l17jji ASD0l19nnk 0
ASD0l17jji ASD0l19nnk 0
ASD0l17jji ASD0l19nnk 0
ASD0l17jji ASD0l19nnk 0
ASD0l17jji ASD0l19nnk 0
NOTE:-
NO_CHILDREN_EXIST = 0 WHEN CHILD Record is present
NO_CHILDREN_EXIST = 1 WHEN CHILD Record is not present
EXPECTED RESULT :-
CHILD_ID PARENT_ID NO_CHILDREN_EXIST ASD0l17jji ASD0l19nnk 0
PROBLEM :-
1. As there are 1000 rows in the table.
So, even if there is a single child record the query fetches 1000 rows !!!
The Actual Result != (NOT EQUALS TO) Expected Result
I want the exact child records corresponding to the given parent_id.
No extra rows which i am getting currently by running the above query.
2. Not able to hold the output of query in a variable
i.e.
SELECT M.CHILD_ID,M.PARENT_ID,SUM (COUNT(*)) OVER (PARTITION BY CHILD_ID),
CONNECT_BY_ISLEAF INTO P_CHLD,P_PRNT,P_COUNT, NO_CHILDREN_EXIST
FROM MY_EX_TABLE M
START WITH PARENT_ID = 'ASD0l16uui'
CONNECT BY PARENT_ID = 'ASD0l16uui' GROUP BY CHILD_ID;
The above query fails to execute !!
Plz. help to resolve the above 2 bottlenecks for the mentioned problem.
Thnksis there anyone to answer my question ??
plz. plz. help...This is the Forum for the SQL Developer Data Modeler product.
You're more likely to get an answer if you use the SQL and PL/SQL Forum: PL/SQL -
Variable entry issue when the query is executed on the WEB
Hi,
When I execute a 2004S query on the WEB,In the variable entry screen , even if I specify for example 'A' for a variable , the 'A' is completly ignored and it returns all the values.So there is a problem with '*'.
If I execute the same query in the Analyser, '*' is considered while returning the results.
Anyone having similar issue.
Thanks in advance.Hi siva,
Its a program error. Please apply the advanced correction from SAP note <a href="https://service.sap.com/sap/support/notes/1062214">1062214</a>
Assign points if helpful,
Regards, Uday -
Oracle text - issue with contains query
Hello,
Need urgent help.
Following code in my procedure is giving me error.
TYPE c_1 is ref cursor;
result_cursor c1;
i_text2 := 'NEW%';
open result_cursor for
'select /*+ INDEX_SS_DESC(e cad_addr_idx2 )*/
from cad_address
where
contains(text, {:i_text2}, 1) > 0
and rec_type in (1,2,3,4)
order by occur_count desc'
using
i_text2;
ORA-00936: missing expression
ORA-06512: at "AV_OWNER.MY_PROC", line 43
ORA-06512: at line 6
Oracle version is 11.2.0.3.0.
Thanks,check your table is 'text indexed' on this 'Text' column.To knoow more about 'text index' go to
http://docs.oracle.com/cd/B19306_01/text.102/b14217/ind.htm
Also refer to the below thread where someone had faced issues with CONTAINS clause.
ORA-20000: Oracle Text error: DRG-10599: column is not indexed -
Problem creating a hierarchical tree in forms builder[issue with the query]
Hi all,
I have 2 tables.
box (box_id, box_name)
item(item_id, item_name, box_id)
In a box there are several items.
I want to create a hierachical tree to display items that are present in each box.
LIKE:
|---BOX1
| |----ITEM 1
| |----ITEM 2
|
|---BOX2
| |----ITEM 1
| |----ITEM 2
Currently i am trying this query:
SELECT -1 state, box_name, 'icon' icon, box_id val
from box b, item i;
I don't know what value to put for level, i don't know how to code the 'connect by prior' part.
Could you please advise me?
Michaël.
PS. Then i will eventually use this query in forms builder.Hi MichaelR
i get the FRM - 47321 error in forms builder ..
Hence In order to populate a tree, the Select order must retrieve 5 columns:
STATUS, LEVEL, LABEL, ICON, VALUE u should notice this orders in ur Query this will solve the error and pls notice that the...
My advice is to use the On Line help in ur forms builder to help u in this ...
Initial state : number
Node tree depth : number
Label for the node : varchar2
Icon for the node : varchar2
Data : varchar2This should be in WHEN-NEW-FORM-INSTANCE-trigger in order to populate ur tree...
another thing why don't u think of building ur tree as i did here in the following example...Pls have a look here ....
Hope this helps...
Regards,
Amatu Allah. -
Hi,
I am displaying the Key and text for the characteristic.....
Is it possible that I can put some column heading for the text part...
Like if I display 0Material (key and text), I can display the column heading for the text part
as "Material Descripion"
Is it possible.......? Please let me know
Thanks , JeetuI dont think it is possible the way you are thinking. However, if you have Material description in the data target (MAKTX) then you can use this in the separate column in the report.
Thanks..
Shambhu
Maybe you are looking for
-
No response when I try to initiate video
Hello: Any help will be much appreciated. I am trying to make video chats work on iChat. I've never been able to do it. I've gotten a range of errors (including error 8). However, currently, when I try to initiate a video chat, my preview window come
-
Consignment Unable to Issue Reservation
We have a consignment material where the inventory located at the plant was transferred to another plant facility. A new PO was created and the same material received in from another vendor for consignment. A reservation has been created to consume
-
Why are dialog boxes acting up in Indesign CC 64-bit?
Hi. I have Windows 7. When I use the regular Indesign, it works fine, but if I try sing the 64-bit version, I cannot use my mouse on the dialog boxes - they don't respond. The only way to navigate around them is with the Tab and arrow keys. Any ideas
-
How to persist interface in JPA?
Hello guys, I am having a class which has a Interface reference as a attribute. If i want to persist my class how i can do that??? class MyNode { //Ref of interface private MyInterface inter; If it is not possible then what it's workaround?? Because
-
WebDynpro of standard transactions
Hi, From a recent FPM-demo by SAP, I was under the impression that most basic SAP functions are converted into webdynpros - and ready to use with FPM/NWBC. For example display sales order, transaction VA03 - from my understanding, this would be avail