Application of stage sets concurrent query parameter query too soon.
e-Business Suite 11.5.10.2 / Oracle Database 10gI have a request consisting of 3 steps.
The 3rd step runs a concurrrent query that has a file name parameter, that is selected in a db table.
The 2nd step performs a competing request that place the name of a file in the simultaneous db of the 3rd request steps table selects data from.
If I run simultaneous queries outside (independent) demand overall, it works very well.
When I run as a set of demand, the 3rd stage, which executes the SELECT statement by typing the name of the file in the db table runs too early and grabbing the previous value in the db table.
I tried to define incompatibilities and several other things. It's as if the SELECT statement runs at the beginning of all of all of the query, instead of run SELECTION when it gets to the step 3.
I am more technical functional, so your help is appreciated.
Thank you.
-Paul Harvey
[email protected]
In my experience, your satisfaction is right on discover that the parameters are obtained before execution and then used. On workaround solutions, if your 3rd program is personalized, do select it as the first step on this issue, then use this info. If not a personalized program, then create a pl/sql "Launcher" that runs to select it to get the name of the file and use the API to call requests to call the actual program.
Tags: Oracle Applications
Similar Questions
-
Setting the query: optimizer does not use the index function
Hello
I have a request written by a developer that I can't change.
It is here that the condition:
OÙ ( UPPER(TRIM (CODFSC)) = UPPER (TRIM ( '01923980500'))
OR UPPER(TRIM (CODUIC)) = UPPER (TRIM ( '01923980500')))
There is an index on CODFSC and on CODUIC1.
the plan is:
Plan
INSTRUCTION SELECT ALL_ROWS cost: 9 194 bytes: 3 206 502 cardinality: 15 054
ACCESS FULL ANAGRAFICA cost TABLE TABLE 1: 9 194 bytes: 3 206 502 cardinality: 15 054
So I created two new index on SUPERIOR (TRIM ()CODFSC)) and SUPERIOR (TRIM ()CODUIC)) but the plan
complete analysis of STIL.
Modifing where condition in:
OÙ ( CODFSC = UPPER (TRIM ( '01923980500'))
OR CODUIC = UPPER (TRIM ( '01923980500')))
the plan is:
SELECT STATEMENT ALL_ROWSCost: 157 bytes: 426 cardinality: 2
CONCATENATION OF 5
TABLE ACCESS BY INDEX ROWID ANAGRAFICA cost TABLE 2: cardinality of 5 bytes: 213: 1
1 INDEX RANGE SCAN INDEX ANAGRAFICA_IDX01 cost: cardinality 3: 1
TABLE ACCESS BY INDEX ROWID ANAGRAFICA cost TABLE 4: cardinality 152 bytes: 213: 1
3 INDEX SKIP SCAN INDEX ANAGRAFICA_IDX02 cost: cardinality 1: 151
Why optimizer not use my funct index?
Thank you.
Franck,
I always forget that the default value for the GOLD expansion depends on a path indexed for each branch.
2 in your use of or_predicates (2) depends on the position of complex predicate which must be expanded. If you change the order of predicate 'State = 0' to display AFTER the complex predicate, you must change the indicator of "or_predicates (1).
Outside of the current state of undocumented indicator, it also introduces the disturbing thought that, for a more complex query, a change in the transformation may result in another set of query blocks generated with a different ranking of the predicates. Yet another case to ensure that if you suggest anything suggest you (or create a SQL database).
Concerning
Jonathan Lewis
-
Hello! I've been paying for and works with the creative crowd for about a year without problem. Now, I get the '414 URI of query too large ' mwssage window whenever I try to open photoshop or even just the creative application of cloud. I uninstalled and reinstalled, but have the same problem. HPEL please!
Follow the procedure below:
Uninstall Adobe Creative Cloud.
Using creative cloud | Uninstall the creative cloud desktop application
Temporarily disable the firewall.
Step 1:
Open the c: drive and navigate to C:\Program Files (x 86)------\Adobe " common files".
Open the Adobe folder and delete folders named Adobe Application Manager and OOBE.
Step 2:
Navigate to C:\Program Files (x 86) \Adobe.
Open Adobe file and if present the file to remove Adobe Creative Cloud . [* important]
Impossible to remove? Rename it to Adobe Creative Cloud centenarians.
Step 3:
Press Windows button (located between Ctrl and Alt buttons) with the key R together at once, you will get a command window.
Type below command and press the enter"" key.
AppData
Then go to the Local > Adobe.
Open the Adobe folder and delete folders named AAMUpdater and OOBE.
Step 4:
Make sure that Adobe Creative Cloud is not listed in the control panel > programs and features. list.
Then, download and install the Adobe Creative Cloud app and check.
https://ccmdls.adobe.com/AdobeProducts/KCCC/1/Win32/CreativeCloudSet-up.exe
Make sure you also, automatic detection of Proxy settings is enabled >
-
6500 E709n installs will not perform at the stage set up.
The installation seems to have been completed, but when it gets to the final stage, set up printer, it just continues to spin and never ends... I tried reinstalling 3 times and the same result. I can print to it but can't scan a document or image.
HP Envy 14 is running Windows 7. I downloaded the software from the HP website for the drive I have is for XP or Vista... my old desktop was working fine using the diskette. It would be wise to try this drive? Any other suggestions?
That is great news! Well like you I'm not sure why all of a sudden, he was able to install properly, perhaps simply a break lol be glad that you're facing up and running. Thanks again for the update
-
I can't connect to the Adobe ID account; 414 URI of query too large
I can not connect.
I changed my zaihon.
When I try to lg in I get this message.
414 URI of query too large
Nginx
and I can't go further
I'm tryinge to update my card information but I can't do it now.
What happens in yhe problem
What I would do.
best regards Bnegt
Hi Bengt,
You can follow the thread: request too large (error 414) URI where this problem is already discussed and resolved.
Let us know if it worked or not.
Thank you
Yann Arora
-
Through a set of query results, replacing one string by another.
I want to write a function that replaces the occurrence of a string with another string different. I need to be a CF fuction which can be called from another function CF. I want to 'hand' this function (a string) SQL statement like this: (Please note, don't bother commenting "there are ways of writing this SQL try..., I made this simple example to get to the point where I need help.) I have to use a 'sub_optimal' SQL syntax just to demonstrate the situation)
Here's the string I want to pass to the function:
SELECT
[VERYLONGTABLENAME]. FIRST NAME,
[VERYLONGTABLENAME]. LAST_NAME,
[VERYLONGTABLENAME]. ADDRESS
Of
LONGTABLENAME [VERYLONGTABLENAME]
Here are the contents of the ABRV table:
TBL_NM, ABRV <! - header line - >
VERYLONGTABLENAME, VLTN
SOMEWHATLONGTALBENAME, SLTN
MYTABLENAME, MTN
ATABLENAME, ATN
The function returns the string origin, but with the abbreviations in place names of the long table, example:
SELECT
VLTN. FIRST NAME,
VLTN. LAST_NAME,
VLTN. ADDRESS
Of
LONGTABLENAME VLTN
Notice that only the table brackets and names that match a value in the table ABRV were replaced. The LONGTABLENAME immediately following the FROM is left as is.
Now, here's my attempt at amateur said written dum function: Please look at the comment lines for where I need help.
< name cffunction output = "AbrvTblNms" = "false" access = "remote" returntype = "string" >
< name cfargument = "txt" type = "string" required = "true" / >< cfset var qAbrvs = "" > <! - variable to hold the results of the query - >
< cfset var output_str = "#txt #" > <!-I create a local variable so I can manipulate the data returned by the parameter TXT. Is it necessary or can I use the parameter txt? ->
< cfquery name = "qAbrvs" datasource = result "cfBAA_odbc" = "rsltAbrvs" >
SELECT TBL_NM, ABRV FROM BAA_TBL_ABRV ORDER BY 1
< / cfquery ><!-I'm assuming that at this point, the query is executed and records in the result-> set
< cfloop index = list "idx_str" = "#qAbrvs #" > <! - is - right? I do not. ->
< cfset output_str = Replace (output_str, "#idx_str #",) <! - is - right? I do not. ->< / cfloop > <!-who am I loop on? What is the index? How to do the replacement of the chain? ->
<!-the chunck, below is a partial of my Object Pascal from Delphi function that does the same thing
I need to know how to write this part in CF9
So what not of folklore
Start
s: = StringReplace (s, ' [' + FieldByName('TBL_NM').]) [AsString + ']', FieldByName ('ABRV'). AsString, [rfReplaceAll]);
Following;
end;
->< cfreturn output_txt >
< / cffunction >
I am mostly struggling with the syntax here. I know what I want to do, I know how to get there in a different programming language, just not CF9. Thanks for any help you can provide.
RedOctober57 wrote:
...
Thanks for any help you can provide.One:
No you need not create a local variable that is a copy of the variable arguments that the scope of the arguments is already local to the function, but you are not referencing correctly the scope of the arguments, then you may be using a variable 'txt' in another scope. So best practice would be to refer to "arguments.txt" where you must.
Two:
I know what I want to do, I know how to get there in a different programming language, just not CF9.
Then a best start would be to descirbe what you want to happen and give a simple example in the other programming language. Most of us is muti-lingual and can analyze code in any clear and clean syntax.
Three:
I think you want to be a loop on your recordset returned by the previous query, perhaps 'qAbrvs '.
Four:
Continuing on this assumption I suppose you want to replace each instance of the long chain with the short form string that record together.
Five:
If this is true, then you loop through the set of records from tablenames and abbreviations that you want to replace the chain.
-
Invalid number when you submit sets of query XML Publisher
Hi all
I face this problem when I click on the option of the second query on the entire application. I found that it is a bug of oracle on metalink. I post this question because I wanted to know if there is no work around for this problem without applying the patch.
Appreciate your help.
Best Reagards,
EdwinHi Edwin,.
According to 6318578 bug, there is no work around, and you must apply the hotfix to resolve the problem. You can also connect a SR and confirm with Oracle support.
Kind regards
Hussein -
Is it possible to set this query...
This query takes 10 minutes to run on Windows 2003, raid10, Oracle 10.2.0.4.Is it doesn't matter what part I can watch in optimizing the query...
Withdrawal of the request...
Published by: Maran Viswarayar on 13 Nov 2009 13:51
Published by: Maran Viswarayar on November 16, 2009 14:58Try something like this I tested with the substr function:
SQL> select substr(pad,2,3) from t where id=368; SUB --- WET SQL> select substr((select pad from t where id=368),2,3) from dual; SUB --- WET
I used the sql statement to replace the function parameter. Of course, it's stupid to use this way, if you do not need to do, but for your case, this could be a solution. In your case, you could write:
FROM TABLE (ADMIN.find_record_dtl ( 8, (select SUBSTR(pc.pay_calendar_id, 0,3) from pr_calendar pc where = SUBSTR(pc.pay_calendar_id, 0,3) = 'RET')), 'HQPRM003')
Therefore, you put any sql that returns the correct value for your second parameter to your function entry. I hope that I wrote the right of expression, like yesterday, I got some garbage inside the text when I copied it.
From the performance point of view I wouldn't function to extract the lines although it uses in BULK COLLECT but would rather use SQL function and integrate it within the main query and get something like:
...FROM( SELECT DISTINCT pc.pay_calendar_id, CASE WHEN ... END AS pay_amount, rd.employee_id, cal_month, data_name, data_desc, data_seq FROM (SELECT distinct report_id, employee_id, employee_name, pay_calendar_id, data_name, data_desc, data_seq, display_name, section_seq, item_id, base_amt, input_amt, calculated_amt FROM list_record_dtl) rd, pr_calendar pc WHERE pc.pay_calendar_id = rd.pay_calendar_id AND SUBSTR(pc.pay_calendar_id, 0,3) = 'RET' AND rd.employee_id = 'HQPRM003' and rd.report_id = 8 ) a RIGHT JOIN ....
So now you have two options yet :-)
Generally, I would prefer rather to not use the service for the following reasons:
(1.) the change of context between engine sql and pl/sql - Fortunately, in your case the function is executed only once (see column starts from your execution plan)
2.) xxx of the instances of the type of data pay_item_t to the result of the query within the service may use lots of memory. This memory is allocated to the PGA and would be seen in v$ process_memory in the category 'other '. Of course, you can also monitor the consumption of memory of PGA of v$ sesstat. Now you will use the three parameters to the function and fewer rows returned as it was before, when the function has returned 192076 lines.
3.) and the last one the more important one - if you use the online mode you give the CBO opportunity to optimize instruction. If you are using the CBO cannot push the predicates of main query within the query that is executed within the function and so it can be like a suboptimal plan even what exactly was your case when you started this thread. Was clearly the person who developed the conscious function of this problem and has tried to solve this problem by additional parameters that are passed to the function and are used to limit the number of rows returned by the function. Unfortunately these two parameters were not used in your case.
4.) it is always a good practice using only the resources you really need and not much more!Published by: Scheid Joze on 19.11.2009 10:50
-
Hello
I need a few entries to grant the request below I'm not good in the part of tuning
platform = x 2-2 qurter rack exadata, linux
Scenario-> we have converted the non table(100gb) partition to the partition table using online redefinition and the sub query takes a long time (4 min), appreciated the inputs by rewriting the query to improve performance
Select * from ODS_RBS #MOBCDR where trunc(ods_rbs#mobcdr_dst) = to_date ('01-25-2015', ' dd-mm-yyyy');
Execution plan
----------------------------------------------------------
Hash value of plan: 291412148--------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |
--------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 25 M | 4580M | 3934K (29) | 00:02:10 | | |
| 1. RANGE OF PARTITION ALL THE | | 25 M | 4580M | 3934K (29) | 00:02:10 | 1. 428.
| 2. HASH PARTITION ALL | | 25 M | 4580M | 3934K (29) | 00:02:10 | 1. 2.
|* 3 | STORE TABLE FULL ACCESS | ODS_RBS #MOBCDR | 25 M | 4580M | 3934K (29) | 00:02:10 | 1. 856.
--------------------------------------------------------------------------------------------------------------Information of predicates (identified by the operation identity card):
---------------------------------------------------3 - storage (TRUNC (INTERNAL_FUNCTION("ODS_RBS#MOBCDR_DST")) = TO_DATE (' 2015-01-25 00:00:00 ',))
'syyyy-mm-dd hh24:mi:ss"))
Filter (trunc (INTERNAL_FUNCTION("ODS_RBS#MOBCDR_DST")) = TO_DATE (' 2015-01-25 00:00:00 ',))
'syyyy-mm-dd hh24:mi:ss"))
Statistics
----------------------------------------------------------
0 recursive calls
0 db block Gets
7024253 compatible Gets
7022727 physical reads
0 redo size
679097582 bytes sent via SQL * Net to client
3702904 bytes received via SQL * Net from client
336582 SQL * Net back and forth to and from the client
0 sorts (memory)
0 sorts (disk)
5048706 rows processedBR
PMP
Hi, PMP,
you have a clue about your date column?
Maybe a component base snap on 'trunc(ods_rbs#mobcdr_dst)' can help.
concerning
Kay -
ADF 12 c, ADF application run twice the search query
Hi all
I use JDeveloper 12.1.2 version and I'm working on the performance of the component of motion of the ADF.
I notice that when you click on the button to search for a query of the ADF component, the sql query is performed 2 times (I drop a test seen as a request of the adf and a table).
The first time you do a search from the first query has no filter. After the first search the two queries are always the same. Is this a known bug?
How can I removed the second query not useful?
Kind regards
Sébastien
This is a known bug (https://java.net/jira/browse/ADFEMG-159) and is fixed 12.1.3. The seams heading a different error, but reading the whole comments, you'll see your mistake.
Timo
-
How to set this query, please suggest me.
Under query returns the rows 50 million but taking 6 minutes to complete:
Select / * + full (udf) full (udm) full (ul) full (d) full (hw) PARALLEL (udf 16) PARALLEL (udm 16) PARALLEL (ul 16) PARALLEL (d 16) PARALLEL (hw 16) * /.
SEPARATE d.dmdunit, d.loc,
-case when d.seasonprofile! = ' ' then rtrim (d.seasonprofile, '_SO')
When d.seasonprofile = ' ' then the UDM. UPPER_ITEM_LEVEL | '_' || UL. UPPER_LOC_LEVEL
end as seasonprofile,
-case when EXTRACTED (D.HISTSTART YEAR) > = NVL (EXTRACT (YEAR FROM HW. STARTDATE), 1970)
then
-case when EXTRACTED (D.HISTSTART YEAR) < = (select EXTRACT (YEAR FROM SYSDATE) double)-2 then (select EXTRACT (YEAR FROM SYSDATE) double)-2
another end extract (D.HISTSTART YEAR)
When EXTRACTED (D.HISTSTART YEAR) < NVL (EXTRACT (YEAR FROM HW. (STARTDATE), (select EXTRACT (YEAR FROM SYSDATE) double)) then
-case when EXTRACT (YEAR FROM HW. STARTDATE) < = (select EXTRACT (YEAR FROM SYSDATE) double)-2
then (select EXTRACT (YEAR FROM SYSDATE) double)-2
on the other EXTRACT (YEAR FROM HW. STARTDATE); ultimately as startyear
d.DMDUNIT | '_' || d.LOC as profilename, UDM. UPPER_ITEM_LEVEL, UL. UPPER_LOC_LEVEL, d.model, 0 MOVINGEVENTAPPLIED
OF STSC.udt_dfuview udf, udm stsc.udt_dmdunit, ul STSC.udt_loc, STSC.dfu d, STSC.histwide hw
where udf.dmdunit = udm.dmdunit
AND udf.loc = ul.loc
AND udf.dmdunit = d.dmdunit
AND udf.dmdgroup = d.dmdgroup
AND udf.loc = d.loc
AND udf.jda_dfuview_level (111, 112, 114)
AND udf.calcmodel = 1
AND udf.dmdunit = hw.dmdunit (+)
AND udf.dmdgroup = hw.dmdgroup (+)
AND udf.loc = hw.loc (+)
AND udf.attach_seasonality_ind! = 2
AND (d.seasonprofile LIKE the UDM. UPPER_ITEM_LEVEL | '_' || UL. UPPER_LOC_LEVEL | '%' OR d.seasonprofile;
Explain the Plan of the above query:
-----------------------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time | TQ | IN-OUT | PQ Distrib.
-----------------------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 235K | 86 M | | 250K (1) | 00:58:25 | | | |
| 1. QUICK DOUBLE | | 1. | | 2 (0) | 00:00:01 | | | |
| 2. QUICK DOUBLE | | 1. | | 2 (0) | 00:00:01 | | | |
| 3. QUICK DOUBLE | | 1. | | 2 (0) | 00:00:01 | | | |
| 4. QUICK DOUBLE | | 1. | | 2 (0) | 00:00:01 | | | |
| 5. QUICK DOUBLE | | 1. | | 2 (0) | 00:00:01 | | | |
| 6. COORDINATOR OF PX | | | | | | | | | |
| 7. PX SEND QC (RANDOM). : TQ10006 | 235K | 86 M | | 250K (1) | 00:58:25 | Q1, 06 | P > S | QC (RAND) |
| 8. UNIQUE HASH | | 235K | 86 M | 27G | 250K (1) | 00:58:25 | Q1, 06 | SVCP | |
| 9. RECEIVE PX | | 235K | 86 M | | 250K (1) | 00:58:25 | Q1, 06 | SVCP | |
| 10. PX SEND HASH | : TQ10005 | 235K | 86 M | | 250K (1) | 00:58:25 | Q1, 05 | P > P | HASH |
| 11. UNIQUE HASH | | 235K | 86 M | 27G | 250K (1) | 00:58:25 | Q1, 05 | SVCP | |
| * 12 | HASH JOIN | | 72 M | 26G | | 250K (1) | 00:58:22 | Q1, 05 | SVCP | |
| 13. RECEIVE PX | | 183K | 4825K | | 127 (0) | 00:00:02 | Q1, 05 | SVCP | |
| 14. PX SEND BROADCAST | : TQ10000 | 183K | 4825K | | 127 (0) | 00:00:02 | Q1 00 | P > P | BROADCAST |
| 15. ITERATOR BLOCK PX | | 183K | 4825K | | 127 (0) | 00:00:02 | Q1 00 | ISSUE | |
| 16. TABLE ACCESS FULL | UDT_DMDUNIT | 183K | 4825K | | 127 (0) | 00:00:02 | Q1 00 | SVCP | |
| * 17. HASH JOIN | | 75 M | 25G | | 249K (1) | 00:58:20 | Q1, 05 | SVCP | |
| 18. RECEIVE PX | | 78266 | 1834K | | 22 (0) | 00:00:01 | Q1, 05 | SVCP | |
| 19. PX SEND BROADCAST | : TQ10001 | 78266 | 1834K | | 22 (0) | 00:00:01 | Q1, 01 | P > P | BROADCAST |
| 20. ITERATOR BLOCK PX | | 78266 | 1834K | | 22 (0) | 00:00:01 | Q1, 01 | ISSUE | |
| 21. TABLE ACCESS FULL | UDT_LOC | 78266 | 1834K | | 22 (0) | 00:00:01 | Q1, 01 | SVCP | |
| * 22. HASH JOIN | | 75 M | 23G | | 249K (1) | 00:58:19 | Q1, 05 | SVCP | |
| * 23. OUTER HASH JOIN | | 76 M | 5227M | | 200K (1) | 00:46:48 | Q1, 05 | SVCP | |
| 24. RECEIVE PX | | 76 M | 2686M | | 159K (1) | 00:37:10 | Q1, 05 | SVCP | |
| 25. PX SEND HASH | : TQ10002 | 76 M | 2686M | | 159K (1) | 00:37:10 | Q1, 02 | P > P | HASH |
| 26. ITERATOR BLOCK PX | | 76 M | 2686M | | 159K (1) | 00:37:10 | Q1, 02 | ISSUE | |
| * 27. TABLE ACCESS FULL | UDT_DFUVIEW | 76 M | 2686M | | 159K (1) | 00:37:10 | Q1, 02 | SVCP | |
| 28. RECEIVE PX | | 83 M | 2786M | | 41225 (1) | 00:09:38 | Q1, 05 | SVCP | |
| 29. PX SEND HASH | : TQ10003 | 83 M | 2786M | | 41225 (1) | 00:09:38 | Q1, 03 | P > P | HASH |
| 30. ITERATOR BLOCK PX | | 83 M | 2786M | | 41225 (1) | 00:09:38 | Q1, 03 | ISSUE | |
| 31. TABLE ACCESS FULL | HISTWIDE | 83 M | 2786M | | 41225 (1) | 00:09:38 | Q1, 03 | SVCP | |
| 32. RECEIVE PX | | 91 M | 22G | | 49254 (1) | 00:11:30 | Q1, 05 | SVCP | |
| 33. PX SEND HASH | : TQ10004 | 91 M | 22G | | 49254 (1) | 00:11:30 | Q1, 04 | P > P | HASH |
| 34. ITERATOR BLOCK PX | | 91 M | 22G | | 49254 (1) | 00:11:30 | Q1, 04 | ISSUE | |
| 35. TABLE ACCESS FULL | DFU | 91 M | 22G | | 49254 (1) | 00:11:30 | Q1, 04 | SVCP | |
-----------------------------------------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
12 - access("UDF".") DMDUNIT "=" UDM ". ("' DMDUNIT")
filter ("D". "" SEASONPROFILE "AS"UDM ". "' UPPER_ITEM_LEVEL ' | " _'||" « « « UL ». » UPPER_LOC_LEVEL "| " % "OU « D ». » SEASONPROFILE"="
')
17 - access("UDF".") LOC '=' UL '. ("" LOC ")
22 - access("UDF".") DMDUNIT "=" D ". "" DMDUNIT "AND"UDF ". "" DMDGROUP "=" D ". "" DMDGROUP "AND"UDF ". "" LOC "=" D ". ("" LOC ")
23 - access("UDF".") DMDUNIT "=" HW ". "DMDUNIT" (+) AND "UDF". " "" DMDGROUP "=" HW ". "DMDGROUP" (+) AND "UDF". " "' LOC '=' HW '. "LOC" (+)) "
27 - filter("UDF".") CALCMODEL «= 1 AND ('UDF'.» JDA_DFUVIEW_LEVEL '= 111 OR 'UDF'." JDA_DFUVIEW_LEVEL "= 112 OR"
"UDF". ""(=114) AND "UDF" JDA_DFUVIEW_LEVEL '. "" (ATTACH_SEASONALITY_IND"<>2)
Tables do not contain. folders:
-----------------------------------------
SELECT COUNT (*) STSC.udt_dfuview; - 85898925
SELECT COUNT (*) FROM stsc.udt_dmdunit; - 170688
SELECT COUNT (*) STSC.udt_loc; - 79593
SELECT COUNT (*) STSC.histwide; - 55129967
SELECT COUNT (*) STSC.dfu; - 85909083
Thank you, the problem is resolved.
Now it takes half the time. Thanks for your suggestion.
-
Please help me to set a query that was so irritating... (test 2)
I thank in advance for any help, you can provide or you the light can shine
on that. I tried to work this problem for a few days
and continue to run into a wall, so any help is appreciated more.
Overview-
We have a collection of sites. At each location, users can create
checklists and assign ratings to the elements.
Database model:
And some dataCREATE TABLE RATINGS_DETAIL ( RATING_ID NUMBER(5), RATING_DESCRIPTION VARCHAR2(30 BYTE) ); CREATE TABLE ITEMS ( ITEM_ID NUMBER(5), ITEM_DESCRIPTION VARCHAR2(1000 BYTE) ); CREATE TABLE CHECKLIST_USERS ( USER_ID NUMBER(5), USER_NAME VARCHAR2(32 BYTE) ); CREATE TABLE CHECKLIST ( CHECKLIST_ID NUMBER(5), LOCATION_ID NUMBER(5), CHECKLIST_DESCRIPTION VARCHAR2(1000 BYTE), CHECKLIST_DATE DATE, CHECKLIST_EXTERNAL CHAR(1 BYTE) ); CREATE TABLE CHECKLIST_ITEMS ( ITEM_ID NUMBER(5), CHECKLIST_ID NUMBER(5), RATING_ID NUMBER(5), RATING_USER_ID NUMBER(5) ); ALTER TABLE RATINGS_DETAIL ADD (CONSTRAINT RATINGS_DETAIL_PK PRIMARY KEY (RATING_ID)); ALTER TABLE ITEMS ADD (CONSTRAINT ITEMS_PK PRIMARY KEY (ITEM_ID)); ALTER TABLE CHECKLIST_USERS ADD (CONSTRAINT CHECKLIST_USERS_PK PRIMARY KEY (USER_ID)); ALTER TABLE CHECKLIST ADD (CONSTRAINT CHECKLIST_PK PRIMARY KEY (CHECKLIST_ID)); ALTER TABLE CHECKLIST_ITEMS ADD (CONSTRAINT CHECKLIST_ITEMS_PK PRIMARY KEY (ITEM_ID, CHECKLIST_ID)); ALTER TABLE CHECKLIST_ITEMS ADD ( CONSTRAINT CHLIST_ITEM_RATING_FK FOREIGN KEY (RATING_ID) REFERENCES RATINGS_DETAIL (RATING_ID), CONSTRAINT CHLIST_ITEM_USER_FK FOREIGN KEY (RATING_USER_ID) REFERENCES CHECKLIST_USERS (USER_ID), CONSTRAINT CHLIST_ITEMS_LIST_FK FOREIGN KEY (CHECKLIST_ID) REFERENCES CHECKLIST (CHECKLIST_ID), CONSTRAINT CHLIST_ITEMS_ITEM_FK FOREIGN KEY (ITEM_ID) REFERENCES ITEMS (ITEM_ID));
To get the items for a given list:Insert into CHECKLIST (checklist_id, location_id, checklist_description, checklist_date, checklist_external) Values (1, 1, 'Internal List 1', TO_DATE('09/01/2011', 'MM/DD/YYYY'), 'N'); Insert into CHECKLIST (checklist_id, location_id, checklist_description, checklist_date, checklist_external) Values (2, 1, 'External List 1', TO_DATE('05/01/2011', 'MM/DD/YYYY'), 'Y'); Insert into CHECKLIST (checklist_id, location_id, checklist_description, checklist_date, checklist_external) Values (3, 1, 'External List 2', NULL, 'Y'); Insert into CHECKLIST (checklist_id, location_id, checklist_description, checklist_date, checklist_external) Values (4, 1, 'External List 3', TO_DATE('08/01/2011', 'MM/DD/YYYY'), 'Y'); Insert into CHECKLIST (checklist_id, location_id, checklist_description, checklist_date, checklist_external) Values (5, 1, 'External List 4', NULL, 'Y'); Insert into CHECKLIST (checklist_id, location_id, checklist_description, checklist_date, checklist_external) Values (6, 2, 'Internal List 1 (loc 2)', TO_DATE('08/01/2011', 'MM/DD/YYYY'), 'N'); COMMIT; Insert into ITEMS (item_id, item_description) Values (1, 'Item 1'); Insert into ITEMS (item_id, item_description) Values (2, 'Item 2'); Insert into ITEMS (item_id, item_description) Values (3, 'Item 3'); Insert into ITEMS (item_id, item_description) Values (4, 'Item 4'); Insert into ITEMS (item_id, item_description) Values (5, 'Item 5'); Insert into ITEMS (item_id, item_description) Values (6, 'Item 6'); Insert into ITEMS (item_id, item_description) Values (7, 'Item 7'); Insert into ITEMS (item_id, item_description) Values (8, 'Item 8'); Insert into ITEMS (item_id, item_description) Values (9, 'Item 9'); Insert into ITEMS (item_id, item_description) Values (10, 'Item 10'); COMMIT; Insert into RATINGS_DETAIL (rating_id, rating_description) Values (1, 'Low'); Insert into RATINGS_DETAIL (rating_id, rating_description) Values (2, 'Med'); Insert into RATINGS_DETAIL (rating_id, rating_description) Values (3, 'High'); COMMIT; Insert into CHECKLIST_USERS (user_id, user_name) Values (1, 'Internal User'); Insert into CHECKLIST_USERS (user_id, user_name) Values (2, 'External User'); COMMIT; Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (1, 1, 1, 1); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (2, 1, NULL, NULL); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (3, 1, 1, NULL); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (4, 1, 3, 1); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (5, 1, 3, 1); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (8, 1, 2, 1); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (1, 2, NULL, NULL); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (2, 2, NULL, NULL); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (6, 2, 2, 2); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (7, 2, 1, 2); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (1, 3, NULL, NULL); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (8, 3, 2, 2); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (1, 4, 3, 2); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (6, 4, 1, 2); Insert into CHECKLIST_ITEMS (item_id, checklist_id, rating_id, rating_user_id) Values (8, 4, NULL, NULL); COMMIT;
and1 SELECT CC.checklist_id, II.item_id, CHI.rating_id, RR.rating_description 2 FROM checklist CC 3 LEFT JOIN checklist_items CHI ON CC.checklist_id =CHI.checklist_id 4 LEFT JOIN items II ON CHI.item_id =II.item_id 5 LEFT JOIN ratings_detail RR ON CHI.rating_id =RR.rating_id 6* WHERE CC.checklist_id =1 SQL> / CHECKLIST_ID ITEM_ID RATING_ID RATING_DESCRIPTION ------------ ---------- ---------- ------------------ 1 3 1 Low 1 1 1 Low 1 8 2 Med 1 5 3 High 1 4 3 High 1 2
Now the problem:1 SELECT CC.checklist_id, II.item_id, CHI.rating_id, RR.rating_description 2 FROM checklist CC 3 LEFT JOIN checklist_items CHI ON CC.checklist_id =CHI.checklist_id 4 LEFT JOIN items II ON CHI.item_id =II.item_id 5 LEFT JOIN ratings_detail RR ON CHI.rating_id =RR.rating_id 6* WHERE CC.checklist_id =4 SQL> / CHECKLIST_ID ITEM_ID RATING_ID RATING_DESCRIPTION ------------ ---------- ---------- ------------------------------ 4 1 3 High 4 6 1 Low 4 8
For a given location, there may be multiple lists - 1 list of audit 'Internal' and any number of checklists "External" (including 0). They may, but have not, share items.
It should pull up a query that joins the list of internal control with the most recent list of external audit. And there manage if there is no list of external control.
So far, the best I've been able to understand is to make each separate list and then try to merge the results later, but it's not effective for hundreds of possible objects we need to "Preview" in several places and find all their results which would be thousands of results.
So, I want a single query to retrieve the data if possible. I can make a separate request for internal identification numbers and a list of corresponding external audit.
I need to produce something like this:
What I want is a result like this1 SELECT checklist_id AS INTERNAL_ID FROM checklist 2* WHERE checklist_external ='N' AND location_id =1 SQL> / INTERNAL_ID ----------- 1 1 SELECT EE.checklist_id AS EXTERNAL_ID 2 FROM checklist EE 3 WHERE EE.checklist_external ='Y' 4 AND EE.checklist_date =(SELECT max(EE2.checklist_date) 5 FROM checklist EE2 6 WHERE EE2.checklist_external ='Y' 7 AND EE2.location_id =EE.location_id) 8* AND EE.location_id =1 SQL> / EXTERNAL_ID ----------- 4
INTER EXTER ITEM_ID I_RATING E_RATING ----- ------ -------- ---------- --------- 1 4 1 Low High 1 2 1 3 Low 1 4 High 1 5 High 4 6 Low 1 4 8 Med
Addition of LEFT joins on the right does not work and I can't find a combination that works... what Miss me?1 SELECT CC1.checklist_id AS INTER, 2 CC2.checklist_id AS EXTER, 3 II.item_id, 4 RD1.rating_description AS I_rating, 5 RD2.rating_description AS E_rating 6 FROM items II 7 JOIN checklist_items CHI1 ON II.item_id =CHI1.item_id 8 JOIN ratings_detail RD1 ON CHI1.rating_id =RD1.rating_id 9 JOIN checklist CC1 ON CHI1.checklist_id =CC1.checklist_id 10 AND CHI1.checklist_id =1 11 JOIN checklist_items CHI2 ON II.item_id =CHI2.item_id 12 JOIN ratings_detail RD2 ON CHI2.rating_id =RD2.rating_id 13 JOIN checklist CC2 ON CHI2.checklist_id =CC2.checklist_id 14* AND CHI2.checklist_id =4 15 / INTER EXTER ITEM_ID I_RATING E_RATING ---------- ---------- ---------- ------------- -------------- 1 4 1 Low High
-
Customize the e-mail Notification of concurrent query
Hi guys,.
Can someone tell me if it is possible to personalize the body of the notification sending when a concurrent request is submitted. It is thus by default:
---------------------------------------------------
Request number 123123 (ask the name) at 13:00 on May 12, 2011 with the Normal State. This application was filed by USER1. The report can be found at the URL.
Please click here to answer
---------------------------------------------------
Thanks much for any help.
BrianBrian,
Please see if these documents help.
How to change the text/link "Please click here to answer" in the response required Notifications [ID 1083771.1]
It is Possible to remove approve / reject links from the Notification email for approval of expenditure for Internet? [1298366.1 ID]Thank you
Hussein -
Access level of concurrent query (exit 12)
Hello
There was a profile option in version 11.5 ("simultaneous access level: request") which allowed you to define if the users were able to view the output of simultaneous queries by other users (within the same responsibility).
We have all implemented exit 12, but found that this profile no longer exists. Does anyone know how (if at all), you can allow users to view the output of concurrent requests by others?
Ideally, we would like to be able to allow some users (System administrators) the ability to view the result of requests by any user in any other liability (IE: without having to assign responsibility that was used for their own user account) is anyone know if that's possible too?
Concerning
CarlThis profile option has been removed in R12 and replaced with RBAC features, as described in Note 555524.1 of the ML
HTH
Srini choup -
run immediately and the set of query results
Hi gurus,
I want to create a series of paintings on the fly using run immediately.
the table_names are stored in another table work_table.
run immediately (select 'create table' | table_name |) '(id int)' of
* (select table_name in work_tables)); *
This will raise error.
ORA-06550: line 1, column 18:
PLS-00103: encountered the symbol "SELECT" at the expected in the following way:
(en) - + new case mod not null < an ID >
< between double quote delimited identifiers of > < a variable binding >
instead of using a cursor to run one by one is the lines an alternative solution?
Thank you very much
CharlesMay not know why you want to do it in a single statement, anyway:
SQL> select * from work_tables; TABLE_NAME ------------------------------ x1 x2 SQL> declare 2 str varchar2(32000); 3 begin 4 for r in (select table_name from work_tables) loop 5 str := str || 'execute immediate ''create table ' || r.table_name || '( id int )''; ' ; 6 end loop; 7 8 execute immediate 'begin '||str||' end;'; 9 10 end; 11 / PL/SQL procedure successfully completed. SQL> desc x1 Name Null? Type ----------------------------------------------------------- -------- ------------------------------ ID NUMBER(38) SQL> desc x2 Name Null? Type ----------------------------------------------------------- -------- ------------------------------ ID NUMBER(38)
Max
http://oracleitalia.WordPress.comPublished by: Massimo Ruocchio, February 18, 2010 15:03
Maybe you are looking for
-
Opening firefox to a blank Web page and a 2nd
I don't know how Open firefox on a blank page - I know also how to open firefox to multiple pages - BUT how can I open it firefox an empty page, including a 2nd page of my choice. It's for people who perfer not showing their home page at startup - in
-
How can I fix the damaged file sql server database ME?
Standby my mdf file got damage due to unknown reasons then I used the command dbcc chekcdb but it failed, file MDF is important to me, I don't ' know how to recover data from the mdf file. Please anyone suggest me?
-
I have recently upgraded from XP Service pack 1 to Service pack 3 and now have IE8 and Norton 360.
-
Hi allI need to define pre / post text element using oracle sql. I did create a report region and add items of apex dynamically using sql queries.now, I need set items pre/post to one of these question. Assume that the question is - thisapex_item. Te
-
Timeline missing options at the bottom, without Peel onion etc...
Hello worldPlease someone help me here T_TI don't know why my edit looks like this ANIMER CC, there is no bar at the bottom, I can't scroll, I don't have options like the onion skin...What is going on? I totally freak out. It looks like this:Whereas