Problem with cursor query (Oracle 8i)
Hi allThe following query works perfectly well if I test it in my development environment
SELECT dt,
(SELECT 'Y'
FROM dual
WHERE EXISTS (SELECT 'x'
FROM top_days t
WHERE t.date = dt))
FROM (SELECT to_date(p_date_start, 'dd-mm-yyyy') + LEVEL - 1 dt
FROM dual
CONNECT BY LEVEL <=
to_date(p_date_end, 'dd-mm-yyyy') - to_date(p_date_start, 'dd-mm-yyyy') + 1
AND PRIOR dbms_random.value IS NOT NULL) --workaround for oracle 8i
,
top_days t
WHERE dt = t.date(+)
ORDER BY dt;
However, when I try to include it in my package (where it is used in a slider) I get a PLS-00103: encountered the symbol "SELECT" when expecting one of the following numbers: (- + mod null other < an ID > etc.)CURSOR c_holidays IS
SELECT dt,
(SELECT 'Y'
FROM dual
WHERE EXISTS (SELECT 'x'
FROM top_days t
WHERE t.date = dt))
FROM (SELECT to_date(p_date_start, 'dd-mm-yyyy') + LEVEL - 1 dt
FROM dual
CONNECT BY LEVEL <=
to_date(p_date_end, 'dd-mm-yyyy') - to_date(p_date_start, 'dd-mm-yyyy') + 1
AND PRIOR dbms_random.value IS NOT NULL) --workaround for oracle 8i
,
top_days t
WHERE dt = t.date(+)
ORDER BY dt;
Is there something special I don't know for Oracle 8i which prevents me from using this query in a slider? Or am I just missing something blatantly obvious?Note: p_date_start and p_date_end are parameters that are filled in the service
FYI: Oracle 8i release version 8.1.7.4.1 and PL/SQL Release 8.1.7.4.0
Scalar subqueries in the select list have been introduced in SQL 8i but not in PL/SQL 8i. The only solution to use subqueries in the select list in PL/SQL 8i is dynamic SQL:
OPEN v_ref_cursor FOR '
SELECT dt,
(SELECT 'Y'
FROM dual
WHERE EXISTS (SELECT 'x'
FROM top_days t
WHERE t.date = dt))
FROM (SELECT to_date(p_date_start, 'dd-mm-yyyy') + LEVEL - 1 dt
FROM dual
CONNECT BY LEVEL <=
to_date(p_date_end, 'dd-mm-yyyy') - to_date(p_date_start, 'dd-mm-yyyy') + 1
AND PRIOR dbms_random.value IS NOT NULL) --workaround for oracle 8i
,
top_days t
WHERE dt = t.date(+)
ORDER BY dt';
SY.
Tags: Database
Similar Questions
-
Problem with hierarchical query in function PL\SQL
I have a simple table containing the ID of the parent
-Create table
create the table1 table:
(
ID NUMBER (12) not null,
year number 4.
month NUMBER (2),
parent_id NUMBER (12)
);
-Create/recreate primary, unique and foreign key constraints
change the table1 table:
Add primary key constraint PK_TABLE1 (ID);
change the table1 table:
Add the foreign key constraint FK_TABLE1_PARENT (PARENT_ID)
reference TABLE1 (ID);
data:
Insert into TABLE1 (id, year, month, parent_id)
values (5, 2015, 12, 3);
Insert into TABLE1 (id, year, month, parent_id)
values (6 (2015), 12, 4);
Insert into TABLE1 (id, year, month, parent_id)
values (3 (2015), 11, 1);
Insert into TABLE1 (id, year, month, parent_id)
values (4 (2015), 11, 2);
Insert into TABLE1 (id, year, month, parent_id)
values (1, 2015, 10, null);
Insert into TABLE1 (id, year, month, parent_id)
values (2 (2015), 10, null);
commit;
and query
with h as
(select t.id, t.year, t.month, CONNECT_BY_ROOT t.id as parent_id from table1 t
where t.year = 2015 and t.month = 12
and CONNECT_BY_ROOT t.year = 2015 and CONNECT_BY_ROOT t.month = 10
connect by prior t.id = t.parent_id)
Select * from:
Join table1 t left t.id = h.parent_id;
It works, but when I put this request in the procedure pl\sql
create or replace procedure is get_report (p_cur_out on sys_refcursor)
Start
Open the p_cur_out for
with h as
(select t.id, t.year, t.month, CONNECT_BY_ROOT t.id as parent_id from table1 t
where t.year = 2015 and t.month = 12
and CONNECT_BY_ROOT t.year = 2015 and CONNECT_BY_ROOT t.month = 10
connect by prior t.id = t.parent_id)
Select * from:
Join table1 t left t.id = h.parent_id;
end get_report;
/
They do not compile. And in the fall, with the exception
Errors of compilation for the PC of the PROCEDURE. GET_REPORT
[Error: PL/SQL: ORA-00600: internal error code, arguments: [qctcte1], [0], [], [], [], [], [], [], [], [], []]
Online: 6
Text: with h as
Error: PL/SQL: statement ignored
Online: 6
Text: with h as
My version of oracle
1 Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production 2 PL/SQL Release 11.2.0.3.0 - Production 3 CORE Production 11.2.0.3.0 4 AMT for Linux: Version 11.2.0.3.0 - Production 5 NLSRTL Version 11.2.0.3.0 - Production What is the problem with my request? Or database? How to solve this problem?
If you have access to MOS, you can search the reason of it. If you are using left join syntax instead of joining ANSI, owner Oracle procedure compiles and returns the result.
-
Problem with LOV in Oracle forms 10g when running on the Web
Dear
I am facing problem in displaying LOV under Oracle developer 10g on the web.
When I press F9 nothing appears on the screen, but in the taskbar, it displays a list of values.
The query I used in the record group executed in SQL * more and it is there no problem with him.
What all I need to do, pls help me to solve the problem.
Thank youHello
You are welcome. :)
whenever the issue is resolved, please mark it as correct and useful so that others may know what is the correct answer.
and take a look at the Label of ForumsKind regards
Manu.
-
Problem with cursor - will switch to a link
I was hoping that someone could help with this.
My dad's Mac has a problem with the cursor. It uses the trackpad and when you try to click on a link, it will not work. The arrow does not change into a symbol of the 'hand' and it can not click on it. This makes it almost impossible to navigate. It seems that the links are not recognized. He tried to use a mouse via the USB port and nothing changes.
He tried to update to El Captain but he can't because the mouse doesn't work. The simple, restart or turn off / suite does not work. The problem persists on Chrome and Safari.
Any help appreciated, thanks.
Hi Irbea,
Thank you for using communities of Apple Support. I see that you are the dad had problems with clicking on the links on his MacBook. These are some great troubleshooting steps to try to solve this problem. I am happy using.
According to the steps that he has already done, I'll try to test this in safe mode. This will allow his MacBook making some changes and prevent the loading of the software. Please follow these steps to safe mode:
Try safe mode if your Mac does not end commissioning
While you are in safe mode, you may notice that the MacBook is running slower or the screen flashes. No worries, it's normal. Read this article for more information about this:
Graphics performance limited in recovery of OS X or in safe mode
If you continue to have problems trying to test in a new user:
How to test a question in another account on your Mac.
Have a great day!
-
Problem with cursor high Pavilion dv8 bar (treble/bass control)
I've had my Pavilion dv8 for a few months now. A couple of months after I got it, I started having problems with the slider treble/bass control. He would sporadically pop-up and begin to change the treble or bass at irregular intervals. He also unplug randomly my wireless connection. I thought that this may have something to do with the cursor being dirty, but after several attempts at cleaning, there is still a problem. At first, it was just a little annoying, fixed by clicking the mouse or pressing the upper button of the internet, but now it of REALLY boring, popping up even as I write this post. Someone at - it solutions? Am I the only one who experience this issue? I have not seen all other positions. Is "slider thing" the right word?
Thanks for any help,
Alex
@ Snooker and everyone.
Here are youtube videos, I started a new thread in the material, it becomes too long.
-
Paths multiple problem with PowerVault MD3200i + Oracle Enterprise Linux (5,7)
Hello
I'm trying to configure MPIO on a host (running Oracle Enterprise Linux Server 5.7) connected to an Powervault MD3200i. I have a few unexpected problems with/dev/dm-0 missing after reboot.
I configured 3 virtual disks (RAID 1) with MPIO. 3 devices have been created (/ dev/dm-0, / dev/dm-1 and/dev/dm-2). If I mount them manually, they work very well, so I've added to the fstab. After a reboot, I checked that/dev/dm-1 and/dev/dm-2 have been automatically but is not/dev/dm-0. In fact, the/dev/dm-0 has disappeared from the directory of the device (!)
If I rinse 'multipath f' and ' multipath - v2 "the device gets recreated, but disappears on the"
next reboot again. How can I resolve this behavior? Can anyone help?Thanks in advance.
See you soon
I thought about it... the problem is that I had the wrong specified dev in fstab.
Should I use the devices in/dev/map /... it worked immediately.
-
Problem with cursor and Transactions
Hi friends,
I will carry out the sub set of orders where some records are removed as a transaction. If there is no problem with a set of transactions, this recordset is ignored and following Recordset is executed. With code below, if an error occurs in one of the statement, control passes to the exception block where it cancels the registration point and unwanted instructions are restored. So far so good. But the problem is execution stops here. I need to skip this record id and loop for remaining IDs. Help, please.
create or replace PROCEDURE DeleteRecords
AS
SelectDate date: = SysDate () - 27;
NRTSI varchar2 (100);
CURSOR c_TrnInfoNull IS select id from trn_info where CREATED_TISTMP < SelectDate and trn_tistmp is set to null;
BEGIN
FOR myrows IN c_TrnInfoNull LOOP
SAVEPOINT TrnSavePointNull;
delete from TRN_ERROR_DETAIL where TRN_INFO_ID = myrows.id;
Select code from NRTSI from TRN_PYMT_DETAIL where trn_info_id = myrows.id;
delete from TRN_PYMT_ADDNL_DATA where TRN_PYMT_DETAIL_ID = NRTSI;
delete from TRN_PYMT_DETAIL where ID = NRTSI;
delete from trn_info where id = myrows.id;
COMMIT;
END LOOP;
EXCEPTION, THEN, THEN go BACK to TrnSavePointNull.
DBMS_OUTPUT. Put_line (dbms_utility. FORMAT_ERROR_BACKTRACE());
END;create or replace PROCEDURE DeleteRecords AS SelectDate date:= SysDate()-27; TRNID varchar2(100); CURSOR c_TrnInfoNull IS select id from trn_info where CREATED_TISTMP
-
Problem with NVL in Oracle 10 g version 10.2.0.1.0
Hello
I am facing a problem with NVL. I have two configurations one with version 10g 10.2.0.1.0, UAT and other with 10.2.0.3.0.
I defined a function (SQL written below). Both configurations have the same defined function and I'm passing the same value/setting as well. But, I get different results on both configurations.
Pls let me know the reasons... .to this strange behavior of function, I think it's because of the NVL
Function
CREATE OR REPLACE FUNCTION Fn_Dt_Get_amnt (NUMBER of N_EXP_COVERED_AMT,
V_SRC_SYSTEM_ID varchar2,
NUMBER OF N_UNDRAWN_AMT_LCY
NUMBER OF N_EXP_LIMIT_NCY
NUMBER OF N_CCF_PERCENT
NUMBER OF N_EXP_AMT_LCY
p_undrawn_amt varchar2)
+ RETURN VARCHAR2 AS +.
+ UNDRAWN_AMT NUMERIC (22.3). +
BEGIN
IF P_UNDRAWN_AMT IN ('EXP_COVERED')
THEN
IF (UPPER (V_SRC_SYSTEM_ID) IN ("UBS"))
THEN
IF (N_EXP_AMT_LCY (case when NVL(N_UNDRAWN_AMT_LCY,0) < 0 +))
THEN 0
of other NVL(N_UNDRAWN_AMT_LCY,0)
(END) * NVL(N_CCF_PERCENT,0)) < N_EXP_COVERED_AMT
THEN
UNDRAWN_AMT: = (N_EXP_AMT_LCY (+)
-case when NVL(N_UNDRAWN_AMT_LCY,0) < 0
THEN 0
OF OTHER NVL(N_UNDRAWN_AMT_LCY,0)
(END) * NVL(N_CCF_PERCENT,0));
ON THE OTHER
UNDRAWN_AMT: = N_EXP_COVERED_AMT;
END IF;
ELSIF (UPPER (V_SRC_SYSTEM_ID) ("VP", "FW", "FN"))
THEN
IF NVL(N_EXP_AMT_LCY,0) (CASE WHEN (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0)) < 0 +)
THEN 0
ELSE (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0))
END) * NVL(N_CCF_PERCENT,0) < N_EXP_COVERED_AMT
THEN
UNDRAWN_AMT: = (NVL(N_EXP_AMT_LCY,0)(+)
CASE WHEN (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0)) < 0
THEN 0
ELSE (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0))
(END) * NVL(N_CCF_PERCENT,0));
ON THE OTHER
UNDRAWN_AMT: = N_EXP_COVERED_AMT;
END IF;
END IF;
ELSIF P_UNDRAWN_AMT IN ('NO')
THEN
IF UPPER (V_SRC_SYSTEM_ID) IN ("UBS")
THEN
UNDRAWN_AMT: = (CASE WHEN NVL(N_UNDRAWN_AMT_LCY,0) < 0
THEN 0
OF OTHER NVL(N_UNDRAWN_AMT_LCY,0)
(END);
ELSIF (V_SRC_SYSTEM_ID) UPPER IN ("VP", "FW", "FN")
THEN
UNDRAWN_AMT: = (CASE WHEN (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0)) < 0
THEN 0
ELSE (NVL(N_EXP_LIMIT_NCY,0)-NVL(N_EXP_AMT_LCY,0))
(END);
END IF;
END IF;
RETURN UNDRAWN_AMT;
END Fn_Dt_Get_amnt;
Setting run
Oracle 10g 10.2.0.3.0
SELECT FN_DT_GET_AMNT(1002872,'FW',699737.78,752154,0.5,52416.22,'EXP_COVERED')
the double - power - 402285.11
Oracle 10g 10.2.0.1.0
SELECT FN_DT_GET_AMNT(1002872,'FW',699737.78,752154,0.5,52416.22,'EXP_COVERED')
the double - power - 1002872I think the problem is with NVL, such that the code works fine with Coalesce on the two configurations. Can someone explain why?
It is a bug, as evidenced by the test case I posted.
Apparently when multiple NVLs are used with the CASE in the same expression.Works fine in the following versions:
10.2.0.4
10.2.0.3
9.0.1.1.1 -
problem with the query insert masking character @.
Hi the gems...
I do through xml schema, run... means using a batch file, I'll call the xml files and the xml file contains the names of files containing all the DDLs and LMD...
No problem with the DDL...
now when I run the LMD, all are working well except a few insert scripts...
Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
'Hi,
Order details:
@Order_ID #.
@Instrument_ID #.
This is an automated email. Please do not reply.',
"executed");
This kind of scripts insert failed with the error "[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.
This problem is due to the @ character before the data...
problem doesn't happen when I run the script explicitly, xml perform only the origin of the problem
So, I need to know if there is a way to hide the sign @...
Please help... Thanks in advanceuser12780416 wrote:
"[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.In SQL * more the @ character means: run a script. That would explain the error message.
The real problem is that your chain is written on several lines. A string like this might work:{code}
Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
"Hi," | Chr (10)
||' Order of details :'|| Chr (10)
|' @Order_ID #' | Chr (10)
|' @Instrument_ID #' | Chr (10)
||' This is an automated email. Please do not respond. »
"executed");
{code}But it might not be a usable workaound.
As you create the string insert sort, you might be able to replace all line breaks in the present with you own custom lines.Replace (yourEventMessage, Chr (10), "' |) Chr (10): "')
-
Hello
I need to query this xml file:
< a > < action id = "1" > < alarm id = "1000" > 3 < / alarm > < alarm id = '1001' > 2 < / alarm > < alarm id = "31" > 2 < / alarm > < / action > < Code action = "3" > < alarm id = "16" > 5 < / alarm > < / has >
I need to add the action/@id attribute to this query:
I have now the recordset is fine enough:select aa.hour, to_number(extract(value(xa),'alarm/@id')) alm_, to_number(extract(value(xa),'alarm/text()')) freq_ from t_alarm_stats aa, xmltable('$XML/a/action/alarm' passing aa.x_alarm AS "XML") xa where aa.id_device = 3194 and aa.hour > trunc(sysdate-1);
time, id_alarm and frequency of the alarm:
28/03/2011 01:00 1000 3
28/03/2011 01:00 1001 2
28/03/2011 01:00 31 2
28/03/2011 01:00 16 5
I need to also add the corresponding action/@id, but I don't know how to navigate to a higher level of my xml so that the Recordset:
time, action id, id_alarm and frequency of the alarm:
28/03/2011 01:00 1 1000 3
28/03/2011 01:00 1 1001 2
28/03/2011 01:00 1 31 2
28/03/2011 01:00 3 16 5
Y at - it the possibility to do this with 1 query?
Thanks in advance,
SamuelHello
This should do it:
select aa.hour , xa1.action_id , xa2.alarm_id , xa2.alarm_freq from t_alarm_stats aa, xmltable('$XML/a/action' passing aa.x_alarm AS "XML" columns action_id number path '@id', alarms xmltype path 'alarm' ) xa1, xmltable('/alarm' passing xa1.alarms columns alarm_id number path '@id', alarm_freq number path '.' ) xa2 where aa.id_device = 3194 and aa.hour > trunc(sysdate-1) ;
-
What is the problem with this query in the source
A blank page is region 2. Region1: enter rec_no (-rec_no is varchar2) region2:hide and show that displays one record based on rec_ no region1 entered.
The problem is that I get the following error
ORA-06550: line 1, column 7: PLS-00428: an INTO clause in this SELECT statement
Here's my simple query in a process of pl/sql
Start
Select rec_no, rec_name from mytable where rec_no = upper(:P16_rec_no);
end;
Why? The same query works under the sql command.
what I'm trying to accompolish here, it is because he has given huge if I want to display hide also multiples, regions and allow users to update each region as a result. Help, please. It kills me that I just can't understand what is causing the problem to the query. Thank you.Hello
The list is set to the field EMPLOYEE_ID itself? What is the primary key of the table? In my example, DEPTNO is the primary key and I used the element generated by the wizard page to display the list. The parameters of the Source of the item itself or the column DEPTNO and database so that the process "process line...". "to identify the updated row.
Andy
-
PROBLEM WITH SQL QUERY.
Hi all
I am executing the following query, which I use to retrieve unique records.
SELECT OH. ORDER_ID, OH. ORDER_DATE, OH. GRAND_TOTAL, OSI. DESCRIPTION ACE ORDER_STATUS,
PMT. DESCRIPTION AS PAYMENT_METHOD, TR. AS PAYMENT_STATUS DESCRIPTION
OF ORDER_HEADER OH INNER JOIN ORDER_PAYMENT_PREFERENCE OPP ON OH. ORDER_ID = OPP. ORDER_ID and
OPP. CREATED_DATE = (SELECT MAX (CREATED_DATE) OF ORDER_PAYMENT_PREFERENCE WHERE THE ORDER_ID = OH. ORDER_ID)
PAYMENT_METHOD_TYPE PMT, STATUS_ITEM SO, STATUS_ITEM OSI
WHERE OPP. PAYMENT_METHOD_TYPE_ID = PMT. PAYMENT_METHOD_TYPE_ID AND
OPP. BATCH = IF. BATCH AND OH. BATCH = OSI. BATCH AND
(OH. BATCH = "ORDER_CREATED" | OH. BATCH = "ORDER_HOLD") AND
OH. "CREATED_STAMP > = ' 2011-12-03 11:41:04.
Problem I am facing is, for some a few order_ids we have several entries in ORDER_PAYMENT_PREFERENCE with CREATED_DATE even where query return me of duplicate records.
I applied OPP. "CREATED_DATE = (SELECT MAX (CREATED_DATE) OF ORDER_PAYMENT_PREFERENCE WHERE THE ORDER_ID = OH. ORDER_ID)' forced to get the record, unique, but as I said to few recordings, we have several lines in ORDER_PAYMENT_PREFERENCE corr. ORDER_ID single and multiple records have same CREATED_DATE.
Can you suggest a few changes, the query to retrieve unique records.
I know I'm a very abstract information, shortly I'll provide table structure and little info I want in this query.
It's because of the tight work schedule.
Thank you
Jagdeep SinghHello
Basically, you need to convert a number in his order inside each created_date order_payment_preference. However, if you have more than one created_date which is him even you'll actually choose one of them at random unless you specify an order more squeezed by the clause. For example, you might have a numeric value from a sequence that could be added to determine which input was really the most recent. In any case the following should give you an idea what I mean...
SELECT order_id, order_date, grand_total, order_status, payment_method, payment_status FROM ( SELECT oh.order_id, oh.order_date, oh.grand_total, osi.description AS order_status, pmt.description AS payment_method, si.description AS payment_status ROW_NUMBER() OVER(PARTITION BY opp.order_id ORDER BY opp.created_date DESC) rn FROM order_header oh JOIN order_payment_preference opp ON oh.order_id = opp.order_id JOIN payment_method_type pmt ON opp.payment_method_type_id = pmt.payment_method_type_id JOIN status_item si ON opp.status_id = si.status_id JOIN status_item osi ON oh.status_id = osi.status_id WHERE AND oh.status_id IN('ORDER_CREATED','ORDER_HOLD') AND oh.created_stamp >= '2011-12-03 11:41:04' ) WHERE rn = 1
Some notes if - it is not a good idea to mix the styles of the junction between ansi and oracle style, it makes it difficult to follow. Just choose one or the other.
OH.STATUS_ID='ORDER_CREATED' || OH.STATUS_ID='ORDER_HOLD'
Makes no sense. I took a guess that you meant, OR then I converted to an IN clause that will do the same job.
HTH
David
-
Dynamic problem with lookup-query for the purpose of resource request
Hi all
I need to set up several IOM user exchange mailboxes, I can set up AD account and account of the mailbox without any problem, but only for the first ad and Exchange account. For the second and third, etc. I get the error: "Invalid login name" during Exchange of account provisioning. I discovered that this problem exists with Exchange Connector - it is not able to collect correct GUID. So in my xml Dataset I use dynamic query Lookup to select manually correct Alias, the login name and GUID. The query for the GUID is the sequel (I cloned RO for AD and Exchnage):
AttributeReference available-in-bulk = "true" length = "32" widget = 'search query' type = 'String' attr-ref = "Object GUID" name = "Object GUID" >
* < lookupQuery search-query = "select distinct UD_KFUSER_OBJECTGUID GUID, ud_KFUSER_uid like UD_KFUSER UD_KFUSER, orc orc Login, sta sta where UD_KFUSER.orc_key = orc.orc_key and orc.usr_key = ' $Form data." Take ' and UD_KFUSER. "UD_KFUSER_AD = 27 and orc.orc_status = STA.sta_status AND STA.sta_bucket! = 'Cancelled'" display-field = "GUID" save-field = "Object GUID" / > *.
* < / AttributeReference > *.
My questions are:
1. I have to type * to run the query in the user interface, without * I got error:
+ < 17 February 2012 11:12:22 THIS > < error > < oracle.adfinternal.view.faces.config.ric +.
h.RegistrationConfigurator > < BEA-000000 > < ADF_FACES - 60096:Server Exception durin
PPR, #10 g
oracle.iam.platform.canonic.base.NoteException: an error occurred during executin
g the search query.
to oracle.iam.platform.canonic.agentry.GenericEntityLookupActor.perform)
GenericEntityLookupActor.java:337)
Is this right?
2. when I got correct values (from the search query) - they are missing on the details of the application and form of RO - what Miss me?
I use OIM 11.1.1.5, in my xml dataset I use correct attr-Ref (labels), when I type the values manually, they are propagated to form RO and Exchange mailbox is created.
Best
MPI not had no problem when writing search query.
This works very well for me.
The request will be filled for the field, so why choose *?
I used as
-
Problem with cursor Max for the PLSQL called by OAF Page
All,
We developed a custom and Self Service OFA this page page, we call PLSQL package to validate and insert the data into the database tables. It worked well, but when we deployed this form throughout the Organization (meaning more users), we reach the limits of MAX cursor for a session.
This for allows Manager to update all their coordinated under, so in a session, a Manager may work on more than one employee so reach the limit of MAX cursor.
Please help on how we can solve this problem, I checked all of the cursors used in the PLSQL package are closed properly.
Ex PLSQL Call:
String createRow = null;
try {}
OADBTransaction oadbtransaction = (OADBTransaction) pageContext.getApplicationModule (webBean) .getTransaction ();
java.sql.Connection connection = oadbtransaction.getJdbcConnection ();
CallableStatement callablestatement = oadbtransaction.createCallableStatement ("start: 1: = xxx_hr_multiple_rates_pkg.is_create_job_row (pc_job_name = >: 2);") end; ", 1);
callablestatement.setString (2, primaryJob.getText (pageContext));
callablestatement.registerOutParameter(1,Types.VARCHAR);
CallableStatement.Execute ();
createRow = callablestatement.getString (1);
String [] retVals = am.invokeMethod ("createWFMJob", parameter1) (String []);
System.out.println("CreateRow:"+CreateRow);
CallableStatement.Close ();
}
catch (Exception e) {}
e.printStackTrace ();
pageContext.writeDiagnostics (this, try (), 1);
}
Thank you
A
Ankit,
Please attach your PL/SQL code, so that we can have a look that the issue could be in that.
In addition,
Why do you call the code inside this test below? What is the link?
String [] retVals = am.invokeMethod ("createWFMJob", parameter1) (String []);
Why do you need the code below? Delete this.
java.sql.Connection connection = oadbtransaction.getJdbcConnection ();
Move the callablestatement.close (); outside of try catch.
See the link, if you need some examples below:
Advice from the Oracle Johny: OAF: sample code to call the function PL/SQL of OA Framework
See you soon
AJ
-
What is the problem with this query?
Hello
I need some advice on how to change the following query (with perhaps some analytical function) to speed it up. Currently, it takes 6 + minutes. This query is executed in response to a request from the front-end application and 6 + min is certainly unacceptable.
I am trying to provide as much information I can think, but if more information is needed, please let me know.
I have a table called "wave_result". It contains millions of rows. PK is Wave_Id, Version_nbr, node_nbr and prod_nbr. For each 'wave_id + node_NBR + prod_nbr' there are several versions (version_nbr). In the following query, I try to extract a line with MAX version_nbr for combination of ' wave_id + node_NBR + prod_nbr.
H3. Request:
H3. Rank of charges:SELECT ip1.fnln_cat, ip1.sub_cat, ip1.bus_cat, NVL (SUM (ip1.lsu), 0) val FROM ideal_prod ip1, ideal_store s, wave_result wr WHERE wr.wave_id = 51 AND wr.prod_nbr = ip1.prod_nbr AND wr.wave_id = ip1.wave_id AND wr.version_nbr = (SELECT MAX (wr1.version_nbr) FROM wave_result wr1 WHERE wr1.wave_id = wr.wave_id AND wr1.node_nbr = wr.node_nbr AND wr1.prod_nbr = wr.prod_nbr) AND NVL (wr.ovrd_dcsn_nm, wr.dcsn_nm) = 'Add' AND s.wave_id = wr.wave_id AND s.node_nbr = wr.node_nbr GROUP BY ip1.fnln_cat, ip1.sub_cat, ip1.bus_cat
========
"wave_result" is the largest table with millions of rows.
H3. StatsTable Total Rows Rows for wave_id = 51 Ideal_prod 188K 38K Ideal_store 3K 574 Wave_result 90M 19M
are updated almost daily by the DBA (not sure if that's a good or bad).
H3. Explain the Plan:
=========
H3. Sample data:SELECT STATEMENT ALL_ROWS Cost: 330,737 Bytes: 401,787 Cardinality: 14,881 12 HASH GROUP BY Cost: 330,737 Bytes: 401,787 Cardinality: 14,881 11 VIEW VIEW SYS.VM_NWVW_2 Cost: 330,737 Bytes: 401,787 Cardinality: 14,881 10 FILTER 9 HASH GROUP BY Cost: 330,737 Bytes: 2,425,603 Cardinality: 14,881 8 HASH JOIN Cost: 327,183 Bytes: 41,233,784 Cardinality: 252,968 1 INDEX RANGE SCAN INDEX (UNIQUE) APAPOPR.XPKIDEAL_STORE Cost: 4 Bytes: 13,202 Cardinality: 574 7 HASH JOIN Cost: 327,178 Bytes: 35,415,520 Cardinality: 252,968 5 HASH JOIN Cost: 198,619 Bytes: 18,764,328 Cardinality: 183,964 3 TABLE ACCESS BY INDEX ROWID TABLE APAPOPR.IDEAL_PROD Cost: 939 Bytes: 2,272,380 Cardinality: 37,873 4 TABLE ACCESS FULL TABLE APAPOPR.WAVE_RESULT Cost: 197,063 Bytes: 7,974,414 Cardinality: 189,867 6 INDEX RANGE SCAN INDEX (UNIQUE) APAPOPR.XPKWAVE_RESULT Cost: 82,467 Bytes: 721,495,854 Cardinality: 18,986,733
===========
H3. Version of database information are below to:For wave_id = 51 there are 28466854 rows in "wave_result" table For wave_id = 51 and node_nbr = '0201' and prod_nbr = '0226960' there are 3 rows in "wave_result" table
=========================
Thank you very much!!Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production PL/SQL Release 11.1.0.7.0 - Production CORE 11.1.0.7.0 Production TNS for IBM/AIX RISC System/6000: Version 11.1.0.7.0 - Production NLSRTL Version 11.1.0.7.0 - Production
ConcerningFor wave_id = 51 there are 28466854 rows in "wave_result" table For wave_id = 51 and node_nbr = '0201' and prod_nbr = '0226960' there are 3 rows in "wave_result" table
As you mentioned that this particular request is called by a front screen, how different search criteria you get it to show on the front end?
Assuming that if the user is searching just of wave_id = 51 which lines returns to 28466854, it is certainly not a good approach to go look up many records to put end Front end is very light and can not hold many records and will be finally the web server will throw off out of memory exception. Always a limit on the number of records that you retrieve from the database and display it on the front plane.
OR
The second case where the user makes a search by wave_id, node_nbr and prod_nbr, even if she returns to 3 lines, behind the scens, he still made a full scan on the wave_result table. If we go with analytical function, we can reduce a sweep of extra table on the wave_result table. Also the table has millions of lines and the max (version_nbr) seems to be a frequently used on this table sub query. While inserting a record into the table wave_result, you must probably have a calculated value that will tell you its value max and you will choose just the rank of this value, instead of at each time max(). something like below...SELECT ip1.fnln_cat, ip1.sub_cat, ip1.bus_cat, NVL (SUM (ip1.lsu), 0) val FROM ideal_prod ip1, ideal_store s, wave_result wr WHERE ipl.wave_id = 51 AND wr.prod_nbr = ip1.prod_nbr AND wr.wave_id = ip1.wave_id AND wr.wave_id = s.wave_id AND wr.node_nbr = s.node_nbr AND wr.precomputed_max_value = 'MAX' AND NVL (wr.ovrd_dcsn_nm, wr.dcsn_nm) = 'Add' GROUP BY ip1.fnln_cat, ip1.sub_cat, ip1.bus_cat;
Maybe you are looking for
-
USB Thumb Drive (UHYBS-064GH) format/write protection fault
Hello Hoping for help. Bought a 64 b USB Thumb Drive (UHYBS-064GH), a private seller, but the point is brand new in packaging. When I tried to copy files through him, he maxed out at comments 45Gig and seems to have caused a clerical error. I was abl
-
iTunes on my laptop does not recognize my iPhone 6. My laptop, it is just the iTunes is not working.
-
Bluetooth of my 300 X does not work after I reinstalled Windows XP. Because I don't have bluetooth and pay attention test before reinstallation, I don't know if it works before or not. :-( I reinstalled Windows XP, did all the updates of windows. I t
-
Characters on the keyboard of laptop are hard to see
The characters on the keyboard of my laptop HP G70-250US are difficult to see. The keys are of bronze and the characters are black. My thought is that the keys should be black and white characters. Is there a solution to this problem before the rep
-
Reference Dell 3115 scan to computer on the network
So we have a 3115cn configured to analyze 10 different computers via SMB. Scanning features has been uneven at best (because of certain parameters mainly) before I completely deleted the address book and started on. I put all using port 139 and the u