I have a table where i need to update one field values based on another field of the same table , simply as it is.I have done this using one select all check box , on clicking that all check boxes of item_trans table will get selected , then i will un select some of check box and then using one button, i will update the value of the fields which are checked only.
I have put the sample code but when i am updating its taking long time and hanging.I am also attaching the form based on the test case provided.
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE1',40,NULL); insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE2',20,NULL); insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE3',20,NULL);
--i want to set the value of trans_Act_qty as trans_qty
--i create one dummy or test block to keep the select all check box. for that table test script is
CREATE TABLE TEST ( C VARCHAR2(2000 BYTE), B NUMBER, A NUMBER );
insert into test (C,B,A) values ('A',1,1);
--code written in select all check box which is created on test.block.
BEGIN GO_BLOCK('item_trans'); FIRST_RECORD; LOOP :M_END_YN := :M_END_ALL; [code].......
--code written in M_END_YN ( actual check boxes where i will uncheck).
IF :M_END_YN = 'N' THEN :M_END_ALL := 'N'; END IF;
--code written on button to update those values which are checked.
BEGIN GO_BLOCK('item_trans'); FIRST_RECORD; LOOP IF :M_END_YN = 'Y' THEN [code]......
I've started using Apex 4.2(new to Apex). I have built a form based on a table with a date column on it. The form allows update on all fields/columns of the base table. For the date field/column, the goal is to present the user with sysdate on load and update the date with sysdate if the record is changed any of the fields. How can I accomplish this?
I'm trying to restrict update in a specific field in my form . I have set its property(update allowed) to no and still the field is update able. I am also having on-commit trigger in my form level that well display a message and followed by the command commit. is it possible the trigger is overriding the property(update restriction).
I have seen in probably VB or Dot net software being used at some premises that there "formula computation is live and interactive".
What i means that suppose a cashier has made invoice having total of 83$. Mow in the text box for entering amount received, the cashier is about to enter 100 but surprisingly the returned value/remaining value (total invoice - amount received) is being computer LIVE.
This is what happens.
1) The cashier entered 1 and the remaining value instantly showed 82 (83-1) 2) then on other key stroke of 0 by cashier and then then the remaining value instantly showed 73 (83-10) 3) then on other key stroke of 0 by cashier and then then the remaining value instantly showed 17 (83-100)
Hence a continuous updation/changing of the remaining value on every key stroke is observed.
I am currently working on a bug that came from a user. An oracle form is used for entering employee information and the backend table is employees. One for the field here is LAN ID. It was found that some users were using space bar either before or after entering the Lan id and this is causing issues in finding the employees in the system. A request is being submitted to not let any blanks or space to be entered in the field. In the table, this particular field/column datatype is varchar2 and the size is 8.
How do I make no blanks or spaces to be entered in the field or otherwise, even if they put a space or blank, the field should only use the actual ID entered.. Is it possible?
How can I compare two rows from the same table and show the field and the difference?
Example:
select ename, job, mgr, hiredate, sal, deptno from EMP t where t.empno = 7782 or t.empno = 7788
ENAME JOB MGR HIREDATE SAL DEPTNO 1 CLARK MANAGER 7839 6/9/1981 2450.00 10 2 SCOTT ANALYST 7566 6/9/1981 3000.00 20
My report comparing fields should be:
FIELD BASE COMPARE DIFFERENCE ENAME CLARK SCOTT -- JOB MANAGER ANALYST -- MGR 7839 7566 -- SAL 2450 3000 550 --(Show difference only for numbers) DEPTNO 10 20 --
Recently i created a form which contains emp_name,deptno,supervisor_name.For emp_name if i type the emp name (eg:allen) it will show me a list of employees named allen as a select list.For that i used a jquery script on page header
and i have created a dynamic action for emp name to fetch the deptno,supervisor_name if select the employee name it is working fine is if i type a emp_name which doesn't exist in the employee table it will show me a alert message employee does not exist and it will clears all the fields.
select in1.empid,in1.atttime,out.atttime from (select empid ,atttime from attend where status=1 and to_char(atttime,'mmyyyy')='022012' order by empid,atttime desc) in1, (select empid,atttime from attend where status =0 and to_char(atttime,'mmyyyy')='022012' order by empid,atttime desc) out where in1.empid=out.empid and in1.empid='02256' order by in1.atttime,out.atttime
But this query do .one value relation with all column.means first february in time with all out time.
orderheader and orderdetails. orderheader is a master table and orderdetails is a detail table. So for every one record in orderheader table, there are many records in orderdetails table. I want to update a field in orderdetails table from a orderheader table using inner join.
update orderdetails set orderdetails.conversion_dt = (select orderheader.conversion_dt from orderheader, orderdetails where orderheader.number= orderdetails.number )
I get the following error:
Error report: SQL Error: ORA-01427: single-row subquery returns more than one row 01427. 00000 - "single-row subquery returns more than one row"
I am trying to execute an UPDATE from a field that may have more than row. I get ORA-01427: single-row subquery returns more than one row.
I need to set the careof column in owner table to hold the name (NAM) from the alt table if the alttype from alt is ATT. We could have more than one id and the careof names can be different.
This is my query:
UPDATE owner s SET s.careof = (SELECT a.NAM FROM alt a WHERE a.taxyr = '2011' AND a.alttype = 'ATT' AND a.card in ('0')
I have an IR where I have to show a column in report, but hide it while downloading to CSV.
I get this by having a condition on this column - NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF') I also have a column where I have to hide it in the report, but show it while downloading to CSV.
I am able to hide it, but this column doesn't show up while downloading.I am using this condition on this column NVL(:REQUEST,'EMPTY') IN('CSV','XLS','PDF','XML','RTF') APEX - 4.0.2
In a classic report, I'm using the Sum functionality and breaks by First Column to get subtotals and report total. I Repeat Headers on Break which works great for the subtotals but I would like for the report to display the column headers above the report total for easier reading. If the last grouping has a lot of data, the user needs to scroll up to read the column headers when looking at the Grand Total.
Is there a way to Repeat Headers prior to report total?
I have a report that comes from SQL Query (updateable report). I'm using the apex_item.text and apex_item.hidden on fields. I'm using a button to submit and after submit process to add some logic that I need.
There could be 1 - 10 records in the report. There is only 1 field that is needed to enter a value, but the value of this field determines the value of another field. I think that I can do this with a submit button and an after submit process where I loop through all the records. I think I have this handled.
This is the question
When the value of that field is changed then the value of another field in the same row changes immediately. All the examples I've seen so far are for a single record and that doesn't work for us.
I guess this is a MRU process but I haven't seen an example where a dynamic action is possible on a Multi Row Update.
Let's say that we have an order entry app and the price and quantity items are already populated. We now want to show the user the extended price (the product of the first two items). the extended price would automatically display after both the quantity and price items are entered. I'm assuming that would require some kind of client-side processing. I imagine server-side processing is simpler, so I'll lean in that direction. I'm sure we've all seen web sites that require you to click a button for the order totals to be updated. I'm okay with that approach, but I haven't quite put all of the pieces together. Here's what I came up with.
A region button was added to trigger the updating of the extended price. The button's "Action When Button Clicked" is to submit the page. Under "Page Processing", a process was created to do the calculation with the recipient of the product being a page item. From debug code in the procedure, I can see that the item containing the extended price was, indeed, modified. But the new value doesn't display in the field and the Session window shows that the value of the item didn't change.
I must be missing something. The debug code says the item value was updated. The Session window says it wasn't updated. What gives? What did I do wrong and what needs to be done to correct this?
I am trying to change the default behavior of Hide/Show Region to show, after some attempts i got it partially working but now clicking the icon to toggle hide/show doesn't work also changed the icons and added type="" but its not working.
I'm trying to update a number field on an apex page by summing up the values of multiple page items. I've tried to follow this tutorial
[URL]........
especially the "Create a Set Value Dynamic Action Using PL/SQL" part.
In the tutorial example they return an page item value P3_SAL multiplied by a multiplier they've determined by another page item's case. What I want to do is much simpler in that I just want to add up multiple page item values and then display them in a number field at the bottom of the page.
so the code I tried to use based on the tutorial is in the tab: Home >Application Builder>Application 103>Page 3>Edit Dynamic Action>Create / Edit Action
Set Type: PL/SQL Function Body
PL/SQL Function Body:
BEGIN return :P3_ITEM1+P3_ITEM2+P3_ITEM3; END;
Page Items to Submit: P3_ITEM1,P3_ITEM2,P3_ITEM3
But it gives me an error that I need to declare the identifiers, yet it works if I only use one item and I can perform any arithmetic.
I have a base table (Table A) block with multiple records displayed. I need to track audits to this underlying table in the following way:
If user updates a field in the block I want the pre-changed record's audit fields to be set and I need to create a copy of the record with the changed values. Basically any changes will result in the record being logically deleted, and a copy record created with the newly changed values.
Tried to implement in the block's pre-update trigger which will call a package to directly update Table A then Insert into Table A, then requery the block. Is there a clean and efficient way to do this?
create table test_schema( col1 varchar2(50) ) insert all into test_schema values ('this_is_a_test') into test_schema values ('this_is_a_test_test') into test_schema values ('this_is_a_test_test_xxxx') into test_schema values ('this_is_a_test_test_aaaaaaaa') select * from dual;
I want to get the length of the col1 value with maximum length of characters also with that field value.
i am using oracle 10 forms ! in report i have used form Query "select sum(sale_price) from (table) expense. i attached it to oracle forms but at that time it does nt show any value!