COMMIT statement for a selected line
HelloI'm working on an OAF page where there is a table region.
This area of the table is linked to a VO and VO at an OA.
I plugged on an EO because the user must be able to enter data directly on the table.
I gave a button down save so that clicking on it, you need to a handler function in my AM.
In the manager function, I getAllFetchedRows in a table, then one by one, I perform checks and then save by calling getOADBTransaction.commit after (vo.setAttribute) with the corrected values.
Now my problem is that I use the same OS used in the above table when recording. So even if I want to save the line by line after audits by programming, the time getOADBTransaction.commit is called for the first line, all lines is saved without even going through the controls.
Is there another way to call the validation so that it only records the line passed and all the lines.
Concerning
Hawker
Raj,
As the method getOADBTransaction.commit is called it will hire all the rows in your table, as you have in the annex EO based VO.
For your condition, you will need to set the commit to the final loop instead of put for each iteration.
Kind regards
GYAN
Tags: Oracle Applications
Similar Questions
-
Assign a value of zero for no. selected lines
Try to find a way to assign a value to null if my account has no line.
What I have right now is:
Have tried different ways but I still get the message:CREATE OR REPLACE FUNCTION count_deductions (empno IN emp.empno%TYPE) RETURN NUMBER IS ded_count NUMBER(2); BEGIN SELECT count(deduction_amount) INTO ded_count FROM emp_deductions WHERE fk_empno = empno; EXCEPTION WHEN NO_DATA_FOUND THEN ded_count :=0; RETURN ded_count; END; /
SQL > select * from show_deduction_v where empno = 7169;
no selected line
Instead of the zero value by filling in the field.Ok. So the problem is that the view returns no rows. It has nothing to do with the service. The function returns 0 if there is no such thing as the EMPNO spent. The problem is that there is no line in the EMP with a 7169 EMPNO. This means that the function is never called.
Why do you want the view to return a row for an EMPNO that does not exist? Is there a table somewhere in the database where a 7169 EMPNO is? If so, your vision may outer join to that table.
Justin
-
Activate GoLink for a selected line
Hello
I have an af:table with one of the columns defined on a goLink which arises from the current record in a layout of the form. Is it possible to activate the link to the currently selected line? I have a problem because if they click on the link in another line, it will still open the folder they have currently selected.
I was hoping to do something like #{bindings. {PubHtmlMainVO.collectionModel.selectedRow not true} for the property of the link disabled, however that everything causes errors. All those put in place something similar?
Any help would be appreciated.
Thank you
JDev 11.1.2.0.0Check the work of Frank around this problem: https://blogs.oracle.com/jdevotnharvest/entry/jdeveloper_11_1_2_command
Timo
-
'Go to the State' vs 'Go to the next State' for the selected button state
I have a series of image galleries in my publication that uses MSOs and buttons to "Go to another" - the thumbnails then have a small edge to have indicated that they are 'selected' - it works very well. The border is added to the click for each thumbnail button state.
I have a similar scenario is a YouTube embed of the video and an article as a MSO with two States: a State is the vid to youtube and the other State is the article of the text. I have a set place button to switch between these two States. This button is set to "Go to the next State" so he'll just between the two States MSO. Is there any way to have a selected State for this button so that the words under the button change to 'play' video in 'see article' while keeping this button set to "Go to the next State" - the only way I can think to do is with two buttons.
I realize, this is a very specific use case and I do not expect the features, but if there is a solution I am curious to know if anyone else has come across this.
Thanks in advance for your help.
Implement for the buttons in the different States. Then add an invisible button on it to the next State meetings.
Bob
-
Remove the feature for the selected lines in the scrolling area
Hello
I created a scroll box with selector box at level 1, so that end users can select desirable to delete lines. I need help of your gurus on the removal of the line feature.
PeopleSoft offers a built-in function to remove lines or Javascript is the best option?
Please help me
Thank youI assumed that the box was a field of a derived record that you placed on the grid yourself.
Probably, you use the grid selection option.In this case you must use the property Selected of the Row object as an indicator.
Local Rowset &RS1; &RS1 = GetLevel0()(1).GetRowset(Scroll.MBT_DEPT_TBL); For &I = &RS1.ActiveRowCount To 1 Step - 1 If &RS1(&I).Selected Then &RS1.DeleteRow(&I); End-If; End-For;
In the previous code, I had a typo in online
&RS2.DeleteRow(&I);
It must be
&RS1.DeleteRow(&I);
Kind regards
Halin
-
How to block a select statement for a table of the specified until validation line
Hello
How to block a SELECT statement for a specified row in a table until willingness to engage occure?
My procedure is part of a Stock request and if a user (X) get stock 1 piece, another user must wait for the user (Y) complete his reportoire.
So, let say my stock have 10 pencils.
When the X user starts the Stock_PLS procedure, in table Stock, line (e.g. R1) that user X should work with it, must be lock up to what the commit / rollback will appear.
procedure Stock_PLS...
Start
..
pencils: pencils-1 =;
..
End
Observation-> pencils: = 9;
This means that is a user there, run SELECT * stock of the table where rows_id = R1, SELECTION should wait the Stock_PLS started by user X will be completed (with commit or rollback) and his SELECT should return the value 9.
What I need, is that Oracle has something like LINE EXCLUSIVE TABLE LOCK, but in my situation the SELECT statement should be denied on the specified lines, until the end of the procedure.
Kind regards
MichaelHello
You can achieve this using the update with the Select clause.
You can write your select statement like this
SELECT * from stock of the table where rows_id = R1 for update; -
TimesTen create a lock for a select statement through sqldev
What ttisql use connect to TimesTen Release 7.0.6.15.0 to autocommit = 1, there is no lock for a select statement.
but when I use sql developer (driver is ttjdbc5.jar, regardless of the version) to connect, even with autocommit = 1, there will be locks for the select statement.
Is this a bug? How can I achieve the same no lock for a select statement through sql developer? Thank you.
-your update told me that you are connected to a remote timesten data store using the client driver
-the output from ttXactAdmin shows that SqlNavigator has a shared lock on the database itself: it will not interfere with someone else "read operations and I think that until you actually try a kind of DML against the database that e IX lock on the database lock will not interfere with any other DML either."
-sharing database lock is still acquired for any transaction TimesTen. You can test it for yourself ttisql: set off autocommit, perform a simple update and do not commit the transaction. Then, open a separate session and run ttxactadmin - you will have the database IX lock as well as the various locks on the tables and indexes.
-I think this pretty much proves my original thought: this sqlDeveloper attaches to TimesTen in transaction mode. However, the IX lock on the database will not interfere with anyone else's work and should not be a problem.
-
EL for obtaining a value of selected line
Hello experts!
I have a page with a table of users and I implement a button named "Reset the user password".
I want to display a popup with a title: "reset password for user: xxxx", where xxx is to be obtained by EL referring to the current user selected in the users table.
Any idea? I use jdev 12.1.2
Thank you!
I found the solution in the book Jobinesh-Oracle that I bought a long time ago! (Thanks!)
Declaratively reading the value of the attribute of the currently selected line
It is very common that when a line is selected in a table, you can update
other fields in the user interface or call some specific operations with attributes of the selected
line. There is an easy way to retrieve the attributes you want for the current of line
definition of the attribute for the attribute binding.
To set the attribute binding, do the following:
1. double-click on the file page definition to open the presentation Editor.
Alternatively, if you have the JSF page opened in the designer
window, and then by selecting the links tab will open the corresponding
page definition file editor.
2. Select the links and the executable tab and click the Green plus icon to
create a control's binding icon that will be displayed on the bindings panel.
3. in the dialog window insert an element, select the generic category of links (if it)
is not selected by default) in the menu drop down and select attribute values
as the point to be created. Click OK to proceed to the next step. In the
Create the attribute Binding dialog box, select the desired data source
(instance of the view object) and then the attribute you want to read
the line selected in the data source. Click OK to have the dialog box.
The following is an example for a binding attribute value defined by choosing the
Collection Departments as data source:
It's in the page definition XML file
ID = "DepartmentName" >
Once you have defined the attribute bindings, you can refer to them using the
EL of the client binding expression. For example, the value of the previous attribute
reference can be made using the expression of ADF link as follows:
#{bindings. DepartmentName.inputValue}
-
SHOW_LOV need to pass a parameter for the select statement
Hello
I have a requirement that there is only a drop down list but the display of the list should be based on the certern parameter.
I have a table (id, type, description). The select statement for dropdown I need is
SELECT id, description of the table where type = & input_param.
Can someone help please!create a field and create value in the list select id, description from table1 where col =: block1.item
-
Case statement with a select &; date in
Hello everyone,
This is my first discussion, so please bare with me.
I am trying to write a case statement with a select statement that compares the dates.
When I write an instruction box with a select statement in it compares everything but dates it works fine. Once the date is there, he collapses.
Here is a super simple example of what I'm trying to do, "b.in_serv_dt" is a date
Select unit_no,
case when ((sélectionnez b.in_serv_dt de b unit_dept_comp_main où a.unit_id = b.unit_id et b.in_serv_dt) > = 1 January 2012 "") then "everybody wins."
When ((sélectionnez b.in_serv_dt dans l'unit_dept_comp_main b où a.unit_id = b.unit_id et b.in_serv_dt) < = 1 January 2012 "") then "Nobody wins".
end
of ottawa_unitmain_v one
Any help would be greatly appreciated
Thank you very much
Hello
your statement of formatting:
Select unit_no
case when ((select b.in_serv_dt
of unit_dept_comp_main b
where a.unit_id = b.unit_id
and b.in_serv_dt
") > = JANUARY 1, 2012"
) and then "everybody wins."
When ((select b.in_serv_dt
of unit_dept_comp_main b
where a.unit_id = b.unit_id
and b.in_serv_dt
)<=>=>
) and then "no winner".
end
of ottawa_unitmain_v oneI see "partial conditions": <... and="" b.in_serv_dt="">> that have no meaning.
I guess it's a kind of "typo" and I ignore them.
If the statement is:
Select unit_no
case when ((select b.in_serv_dt
of unit_dept_comp_main b
where a.unit_id = b.unit_id
") > = JANUARY 1, 2012"
) and then "everybody wins."
When ((select b.in_serv_dt
of unit_dept_comp_main b
where a.unit_id = b.unit_id
)<=>=>
) and then "no winner".
end
of ottawa_unitmain_v oneI guess that the "b select" retrieve one line, through the design of database (forced...)
As already written: be careful with data types: avoid "implicit conversions" (when you compare different data types, Oracle has convert the data type of the other side, a side example: "mystring = mynumber" is transformed into 'TO_NUMBER (mystring) = mynumber', or 'mydate = mystring' translates mydate = TO_DATE (mystring,
) ")
Even better: use explicit conversions, use explicit formats when necessary.
Best: use no conversion on columns from the constants, but use the correct data type for the constant.With this in mind:
Select unit_no
case when ((select b.in_serv_dt
of unit_dept_comp_main b
where a.unit_id = b.unit_id
) > DATE = ' 2012-01-01'
) and then "everybody wins."
When ((select b.in_serv_dt
of unit_dept_comp_main b
where a.unit_id = b.unit_id
)<= date="">=>
) and then "no winner".
end
of ottawa_unitmain_v one
But note that b.in_serv_dt EQUAL to 1 January 2012 (at 00:00:00) is OK for both WHEN the conditions; then the a "win."Now: the subselect statement is identical in the 2 options of the case... You could work differently: (I add the "ELSE" in case one line as NULL in_serv_dt;) I guess that an INNER JOIN is OK, maybe you need a LEFT OUTER JOIN (if some lines of A have no corresponding row in B)
SELECT a.unit_no
, CASE WHEN b.in_serv_dt > = DATE '' 2012-01-01
THEN "everyone wins"
WHEN b.in_serv_dt< date="">
While "Nobody wins".
ELSE ' who knows... ". »
END who_wins
Of ottawa_unitmain_v one
INNER JOIN unit_dept_comp_main b
ON a.unit_id = b.unit_id
;Best regards
Bruno Vroman
-
A statement UPDATE changes the line if the update changes the column even value?
HI -.
I have a main classification and the corresponding audit table. I have a trigger. I created using the suggestion:http://www.runningoracle.com/product_info.php?products_id=211
Now the problem that I am facing is that: if I run the same query (same value) update on the main table for n times (with the same data)... my audit table is updated with a new record every time. He is not able to determine that the value is the same.
My goal is to load the audit table data if the value in a cell in the main table is really have changed.
A statement UPDATE changes the line if the update changes the column even value?
Best regards
I have a main Table and the corresponding Audit Table. I have a trigger. I created using the suggestion:http://www.runningoracle.com/product_info.php?products_id=211
Why?
You try to resolve what made you what are the PROBLEM that select as the solution?
Now the problem that I am facing is that: if I run the same query (same value) update on the main table for n times (with the same data)... my audit table is updated with a new record every time.
Yes - it is EXACTLY what you say that you wanted to do and EXACTLY what the code does in this article.
He is not able to determine that the value is the same.
I think you mean that the code does NOT check if the value is the same. You can certainly change the code to do this check. But I have a question to start with your need for such a solution.
My goal is to load the audit table data if the value in a cell in the main table is really have changed.
OK - then modify the code to check EACH COLUMN and compare its NEW value to the OLD value and insert only the table of audit if SOME (or columns you care specifically) have changed.
A statement UPDATE changes the line if the update changes the column even value?
It depends on what you mean by 'change the line '. Of course to update a column with the SAME value does not change the resulting data value.
But the physical structure of the line, the location of the pieces of line and information in the header block (YVERT, etc.) will change. And, as others have said Oracle doesn't know and doesn't care, so if the new value of a column is the same as the old value will create redo, undo and the rest.
Start over and tell us what PROBLEM you're trying to solve. Then we can help you find the best way to solve it.
-
SELECT LINES FROM TOP TO BOTTOM UNTIL RUNNING TOTAL = SOME_VALUE
In the example below, I will select rows from top until my cumulative total of PAYAMOUNT is less than or equal to 40000
ID RATE DATE ORGAMNT PAYAMOUNT
1 3.23 12/12/12 23000,45 13000.00
2 4.55 30/05/11 40000,55 26000.00
3 6.78 21/03/14 60000,00 60000.00
My output table must be
ID RATE DATE ORGAMNT PAYAMOUNT
1 3.23 12/12/12 23000,45 13000.00
2 4.55 30/05/11 40000,55 26000.00
Appreciate your help.
Kind regards.
Hello
This sounds like a job for the analytical SUM function.
As you post CREATE TABLE and INSERT statements for your data, I will illustrate using the table scott.emp, which is probably on your system.
Scott.EMP contains the ename, hiredate and sal columns below:
ENAME HIREDATE RUNNING_TOTAL SAL
---------- ----------- ---------- -------------
SMITH, 17 December 1980 800 800
ALLEN 20 February 1981-1600-2400
February 22, 1981 DISTRICT 1250 3650
JONES, 2 April 1981 2975 6625
May 1, 1981 BLAKE 2850 9475
CLARK 9 June 1981 2450 11925
13425 1500 08 - Sep - 1981 TURNER
MARTIN 28-Sep-1981 1250 14675
5000 17 November 1981 KING 19675
JAMES 3 December 1981 950 23625
FORD 3000 3 December 1981 23625
MILLER, January 23, 1982 1300 24925
SCOTT on April 19, 1987 3000 27925
ADAMS, 23 May 1987 1100 29025
Now, let's say, we want to show that the first lines (in order by hiredate) where the total sal is not more than 10000. One way to do that would be to use the SUM function to calculate the running_total above column and use running_total in a WHERE clause, the results below:
ENAME SAL HIREDATE
---------- ----------- ----------
SMITH, 17 December 1980 800
ALLEN 20 February 1981 1600
DISTRICT 1250 22 February 1981
JONES, 2 April 1981 2975
May 1, 1981 BLAKE 2850
Here's a way to do it:
WITH got_running_total AS
(
SELECT ename, hiredate, sal
SUM (sal) over (ORDER BY hiredate) AS running_total
FROM scott.emp
)
SELECT ename, hiredate, sal
OF got_running_total
WHERE running_total<=>=>
ORDER BY hiredate
;
The subquery is necessary because the analytic functions are calculated after the WHERE clause has been applied. If we want to use the results of an analytic function in a WHERE clause, you must calculate the function in a subquery (as got_running_total, above).
-
Stats for taking the time to gather
All,
Below is a procedure of stats to gather allows us to collect statistics. Y at - it no changes to settings that can be done to optimize this?
CREATE OR REPLACE PROCEDURE PRESTG . SP_PRESTG_GATHER_TBL_STATS ()schema_name VARCHAR2()
AUTHID CURRENT_USER
AS
type of typ_tbl is table of VARCHAR2 (30)
index of by PLS_INTEGER;
typ_tbl tbl ;
IDX typ_tbl ;
n NOMBRE (10):= 0 ;
BEGIN
run immediate "SELECT table_name FROM prestg_tbl_xref" In BULK COLLECTION of in tbl ;
n : = SQL % Number of LINES;
dbms_output.put_line (n);
IF n > 0 THEN
FOR i IN tbl . First... tbl . Last
LOOP
RUN immediate ' start sys.dbms_stats.gather_table_stats (ownname = > "'| schema_name | ) "', tabname = >" ' || tbl (i) || "', block_sample = > TRUE); END;' ;
END LOOP;
ON THE OTHER
raise_application_error (-20001,'No Tables');
END IF;
run immediate ' select index_name all_indexes where owner = "' | schema_name | "' and table_name in
(SELECT table_name FROM prestg_tbl_xref)' in bulk collection of in idx ;
n : = SQL % Number of LINES;
IF n > 0 THEN
FOR i IN idx . First... idx . Last
LOOP
RUN immediate ' start sys.dbms_stats.gather_index_stats (ownname = > "'| schema_name | ) "', indname = >" ' || idx (i) || '''); END;' ;
END LOOP;
END IF;
END SP_PRESTG_GATHER_TBL_STATS ;
/
Kind regards
Narayan
Once you get a version well beyond the default stats collection, it becomes dependent on how you query the data and what you are. If you have a limited number of queries with a limited number of bind values sent in the settings, this might be different from that of a DSS system with all sorts of strange requests, which could still be different analytical system where the full score scans are the norm. The version determines what options you have to stabilize the query plans.
If you have good plans generated for lots of data which by default would be stale anyway, you might consider importing a standard set of stats for these data. If you have keys to index constantly growing you can always generate 100%. It depends on.
-
Element which brings together in a table selected lines
Hi guys!
Is it possible to have a section that collects the id of the selected lines in a table dynamically (as a comma-separated list)?
Maybe you have an example?
Thank you in advance!
With respect,
PsmakRFor some reason, the check all box did not reflect adjustments described in the topic, it is probably still using the embed code to cehck-all, regardless of what is given in the title.
So I modified the D.A. to add an event handler for the click on the checkbox.
$('input#check-all-rows').click( function(){ $('input[name=f01]:eq(1)').trigger('change'); });
It should work fine now.
-
using an Exit statement for a deletion without affecting an oracle error msg
Hello all;
I have one similar to this delete statement below
the delete statement is in a package, however I would like to make out a simple message to indicate if the deletion was successful which means that a real element has been deleted and if this was not successful another statement for this.delete from tbl_one t where t.tbl_one_location = location and location not in (select distinct p.issuearea from tbl_two p);
I have an idea in my mind which is to track the number of items in tbl_one before deleting and then check the count after removal and if the number is lower, the deletion was successful... therefore the output message. Is the best way to go or there at - it an easier way to do it.
Thank you, any help is appreciated.You could put something like this directly after the DELETE statement:
IF SQL%ROWCOUNT > 0 THEN DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || ' items deleted.'); ELSE DBMS_OUTPUT.PUT_LINE('Nothing deleted!'); END IF;
Maybe you are looking for
-
Title. With hardware acceleration: http://imgur.com/jHRk6Yl words 'empty' look and really weird air instead of being "BOLD". But if I disable it, normal fonts look "weird" in some Web sites (not all) and are difficult to read.Any solution? Thank you!
-
It's always something that ends up screwing up a screen record on El Capitan. I'm sure I have notifications turned off yet I always get trifles which appear as the software updates for stuff like Java. Java is one of the most annoying things on a Mac
-
How PCI confugure 6071E as a counter
Hello This may seem like simple problem: we have a 1 kHz sinusoidal topic (0 - 5V), each pulse can differ a bit, and it has about 9500 cycles. The goal is to know how many cycles (edges of low to high) are there in the second 9.5 analysis. We try to
-
Windows vista the task image is corrupt or has been tampered with (0 x 80041321) Please try again. This happened after Windows update and no solutions yet!
-
I recently bought an unlimited user ASA5505 for domestic use and it will come with the latest firmware/software? (I bought it froma amazon). Also I am looking for the purchase of smartnet for this device, I need support replacement of the device (re