How to insert a value obtained from pageContext.
Dear friends,I value from URL, and I get by using pageContext.getparamter (), now, I want this value
to insert in a table attached to the same page.
How can this be achieved? Please share your ideas.
NOTE: I use insert EO.
Thanks in advance,
Had
Capture the data and the attribute VO in which you want to save, and set its value. Here's the dummy code, you can refer:
String v_projNumber = pageContext.getparamter ();
OAViewObject vo = (OAViewObject) am.findViewObject ("XXViewObject");
If (vo! = null)
{
vo.getCurrentRow () .setAttribute ("projectNumber", v_projNumber);
}
A question, if you want to save this value in a Table view attribute, then will fill the same value for all the lines in this region of the table.
The code above is not for the region of the table. For the table, you will need to loop through the line of VO and having to return to the selected line and setAttribute it.
Thank you
-Anil
http://oracleanil.blogspot.com/
Tags: Oracle Applications
Similar Questions
-
How to insert the value from the FORM to another database table?
Hi all
I have the following problem.
I have a form that has a tabular layout for the MATURED_FD_DTLtable. (all about 20 line items)
CREATE TABLE MATURED_FD_DTL
(
ACCT_FD_NO VARCHAR2 (17 BYTE) NOT NULL,
CUST_CODE NUMBER (9),
FD_AMT NUMBER (15),
FD_INT_BAL NUMBER (15),
TDS NUMBER (15),
CHQ_NO NUMBER (10),
CREATED_DATE DATE,
CREATED_BY VARCHAR2 (15 BYTE),
PREV_YR_TDS NUMBER (15),
ADD_FD_AMT NUMBER (15),
DESCRIPTION VARCHAR2 (100 BYTE),
P_SAP_CODE NUMBER (10),
P_TYPE VARCHAR2 (1 BYTE)
)
By clicking on 'SAVE' button, all values will be automatically is stored in the MATURED_FD_DTLdatabase table.
But I want to insert these values in another table called TEMP.
I want to insert values of form only, no table select.
How can I do this?
Help me.
Is Oracle Designer 6i.
Answer:
BEGIN
Commit_form;
PREMIER_ENREGISTREMENT;
LOOP
insert into TEMP_MATURED_FD_DTL
SELECT * FROM MATURED_FD_DTL WHERE ACCT_FD_NO =: acct_fd_NO;
WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
NEXT_RECORD;
END LOOP;
PREMIER_ENREGISTREMENT;
COMMIT;
MESSAGE ("RECORD UPDATED AS PAID '");
MESSAGE (' ', no_acknowledge);
END;
-
How to insert a value of triggers in the table?
Mr President.
I have the following trigger
CREATE OR REPLACE TRIGGER lineitem_trg BEFORE UPDATE OF lineitem ON voucherdet FOR EACH ROW BEGIN :NEW.LINEITEM := TO_CHAR ( TO_NUMBER (:OLD.LINEITEM) + 1 , 'FM00' ); END lineitem_trg; /
Now to how to add this triggers a value in the table
The value of this trigger is part of the primary key with voucher_id which is obtained by the voucher_id_seq
This is my database as below
CREATE TABLE "NOM" ( "ACCT_ID" VARCHAR2(7) NOT NULL ENABLE, "ACCT_NAME" VARCHAR2(50) NOT NULL ENABLE, "O_BAL" NUMBER(13,2), "ITAX_ID" VARCHAR2(7), "SALES_TAX_NO" VARCHAR2(20), "PL_SUPPLIER" VARCHAR2(1) DEFAULT 'N', "STOCK_REPORT" VARCHAR2(1) DEFAULT 'N', "ACCT_TYPE" VARCHAR2(4), CONSTRAINT NOM_PK PRIMARY KEY ("ACCT_ID")ENABLE, CONSTRAINT NOM_ACCT_TYPE_FK FOREIGN KEY ("ACCT_TYPE") REFERENCES "ACCT_TYPE" ("ACCT_TYPE") ENABLE ); CREATE TABLE "VOUCHER" ( "VOUCHER_ID" VARCHAR2(8) NOT NULL ENABLE, "VOUCHER_DATE" DATE DEFAULT sysdate, "POST_DATE" DATE DEFAULT sysdate, "DEBIT" VARCHAR2(7), "CREDIT" VARCHAR2(7), "VOUCHER_SOURCE" VARCHAR2(2), CONSTRAINT VOUCHER_PK PRIMARY KEY ("VOUCHER_ID")ENABLE, CONSTRAINT VOUCHER_NOM_DEBIT_FK FOREIGN KEY ("DEBIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHER_NOM_CREDIT_FK FOREIGN KEY ("CREDIT") REFERENCES "NOM" ("ACCT_ID") ENABLE ); CREATE TABLE "VOUCHERDET" ( "VOUCHER_ID" VARCHAR2(8) NOT NULL ENABLE, "DEBIT" VARCHAR2(7) NOT NULL ENABLE, "CREDIT" VARCHAR2(7) NOT NULL ENABLE, "PARTICULARS" VARCHAR2(100), "AMOUNT" NUMBER(21,2), "LINEITEM" VARCHAR2(4) DEFAULT '01', "V_ID_ITAX" VARCHAR2(11), "V_ID_PAY" VARCHAR2(11), "CHALLAN_NO" VARCHAR2(10), CONSTRAINT VOUCHERDET_PK PRIMARY KEY ("VOUCHER_ID", "LINEITEM")ENABLE, CONSTRAINT VOUCHERDET_DEBIT_FK FOREIGN KEY ("DEBIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_CREDIT_FK FOREIGN KEY ("CREDIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_VOUCHER_FK FOREIGN KEY ("VOUCHER_ID") REFERENCES "VOUCHER" ("VOUCHER_ID") ON DELETE CASCADE ENABLE );
CREATE SEQUENCE VOUCHER_ID_SEQ INCREMENT BY 1 START WITH 1; begin execute immediate 'create or replace trigger VOUCHER_ID_TRG '||chr(10)|| ' before insert on "ALIZA"."VOUCHER" '||chr(10)|| ' for each row '||chr(10)|| 'begin '||chr(10)|| ' if inserting then '||chr(10)|| ' if :NEW."VOUCHER_ID" is null then '||chr(10)|| ' select VOUCHER_ID_SEQ.nextval into :NEW."VOUCHER_ID" from dual; '||chr(10)|| ' end if; '||chr(10)|| ' end if; '||chr(10)|| 'end;'||chr(10); end; /
Concerning
And I explained to you why it is false.
Go one read what I put above, and I gave an example of (with command and control elements) in the other thread.
If you want the user a composite key as the primary key by using the primary key of the voucher and something else, do this thing, just a sequence that is obtained from a sequence value (not gapless, but always unique). And then you always build your LINEITEM values for display based on this sequence for example
LPAD (to_char (ROW_NUMBER () over (partition by order VOUCHER_ID by LINEITEM)), 2, '0') as a CONTROL element
It's when you query the data to display it, is not to store it in the database. In the database, you simply store an internal sequence number in LINEITEM.
Do not try and store a sequence for your lineitem gapless. It is false.
-
Maintain the value obtained from the CONTEXT of the PAGE until the session expires.
Dear friends,
I find this very difficult matter.
I obtained from URL value (value is separated "&") using pageContext.getParameter () and it is stored in a variable, but when I exit next return to the same page, the page context value is lost due to the change in the URL.
I don't want to store is the value of the variable of some until the user disconnects. Please let me know your suggestion.
My URL looks something like below:
http://46.88.40.122:8988/OA_HTML/OA.jsp?page=/Sony/Oracle/Apps/Inv/comcarrier/WebUI/ComPG & TransactionId = 799085821 & value = jhon & OAS = InNHzf7t6I0dLcnbQATQZQ...
Thanks in advance,
Keerthi.kYou don't need to check the URL.
Once you put any value in the Session, you can directly get the values of session using getSessionValue in pageContext.pageContext.getSessionValue ("user");
This will give you the value user, that you have previously defined in the current sesstion.Kind regards
RAM -
How to insert the value of a LONG data type?
Hi all
Developers what to change the type of data in the PRODUCTS table.
PRODUCT
======
ID number (10) not null,
NAME varchar2 (50) not null,
DESCR varchar2 (250) not null
They want the DESCR to change datataype at LENGTH
So I got back it up first:
create the table product_bak in select * from product;
remove the product;
change the product table change (descr, null);
Edit the product table change (long descr);
Insert into select product * from product_bak;
ORA - 997 - illegal use of LONG data type
How can I recover my data?
Thank you very much.Use TO_LOB to convert long on the CLOB type, then use TO_CHAR to convert CLOB VARCHAR2.
-
How to insert the value of table display
Hi all
I have a page element named that email and set this as view only, now I need to insert this value in the table I use insert statement like this: P255_EMAIL, but it gives an error.
Can someone tell me how to insert this
Thanks and greetings
srikkanth. MSrikkanth,
A single display element is not rendered at the point of entry to the difference of the other editable on the page elements, if you look at the html code of any view one item and compare it with a textfield should be clear.You can have another element hidden with the value that can be returned in the process
ORHere's a little something that does not need any additional items to make the item view alone and still available in the world as a normal part
Do not say P100_MY_ITEM like a textfield
But in the text of element Pre_ give you<span class="display_only" >&P100_MY_ITEM.</span><span style="display:none">
And in the text of item Post_ put
</span>
Hide the textfield object, it shows the value of the item as a single text to display.
-
How to insert a pdf file from a dynamic location in a table
Hi friends
Can you get it one please let me know how to insert a pdf file into a table from a dynamic location to the server.
Suppose that I have a table CUST_BLOB (file_name, file_data). I have a file in the directory c:\local having file_name test.pdf
I want to insert this file in CUST_BLOB. Please help me.
Thanks in advance.
-Ahmeduser620950 wrote:
Hi friends
Can you get it one please let me know how to insert a pdf file into a table from a dynamic location to the server.Why dynamic locations on the server?
Make a business case that the files must be stored in specific locations.
Oracle uses directory objects to point to locations on the file system, and while these places may be changed, it is best to implement the specific locations and grant permission to correct for locations users so that there is total control over who accesses what on the server. While the names of files can be dynamic, I wouldn't recommend using dynamic sites.
-
How to insert the value of the variable using select statement - function Oracle
Hello
I have a function that inserts the record based on a condition
INSERT IN the case
(
Case_ID,
Case_Status,
Closure_Code,
Closure_Date
)(
SELECT newCaseID,
caseStatus,
Closure_Code,
Closure_Date,
CASE
WHERE Case_ID = caseID
);
Now, I want the new value casestatus instead of value caseStatus select statement. I have a m_caseStatus variable and I want to use the value of this variable in the select statement above.
How can I use this.
Thank youINSERT INTO Case ( Case_ID, Case_Status, Closure_Code, Closure_Date )( SELECT newCaseID, m_caseStatus, <-- here place your variable Closure_Code, Closure_Date, FROM Case WHERE Case_ID = caseID );
Nicolas.
-
How to insert duplicate values in another table.
angle of attack!
I created two tables a and b
create table one
(key primary code number);
create table b
(code number,
DAT date);
insert into the table of a (code)
values (1234);
insert into the table of a (code)
values (1235);
commit;
Select * from a;
one
-----
1234
1235
-----
insert into the table of a (code)
values (1234);
commit;
ERROR on line 1:
ORA-00001: unique constraint (GMS. SYS_C0030897) violated
{color: #ff0000} * I need, when the user inserts duplicate data, must be inserted into another table b.* {color}
How can I do in forms 6i? Help, please. Thanks in advance.
Hello
What is the relationship with the forms?
Anyway, you can create a trigger on table A that intercepts the error in an exception block, and then create a new row in table B.
If the error comes from a forms based block, intercept the error in a trigger insert.François
-
How to insert a value predetermined on a cell of a value to another cell
HI, I'm traying to set the automatic values on B1 and D1 cells by entering a value on the A1. I want to save time and work by simply entering a value on the A1 and fill of B1 and D1.
I use numbers on the airwaves of the ipad 2
passengers CG % MAC GTOW CG % MAC 44086 Example:
1 passenger 23, 4-23, 8. 25.5
2 passengers 23, 8-24, 5. 25.8
etc...
Hi gomlic,
"I'm trying to set the automatic values in cells B1 and D1 by entering a value on A1."
Is there a mathematical relationship between the value in A1 and B1 and D1 values, or these values appear on a lookup table?
In your post, what is entered in A1?
What is the result in B1?
What is the result in D1?
What numbers to get from the first to the result?
Kind regards
Barry
-
How to insert the value "DP &; S?
Hi all
I want to insert the record with the value 'DP & S '.
Everything by inserting a record due to & it will ask for the value of the parameter.
a solution is: set define off
Any other solution?
Thank you
SaguftaDiscover the escape characters.
A way
INSERT INTO t VALUES (has ' |' &'| ') P') ;
;)
See you soon!
BobinPublished by: Buga on October 26, 2009 08:09
-
How to insert a dynamic image from a database
I recently started using Dreamweaver CC to set up a dynamic site (PHP pages with a mySQL database). With perseverance and downloading new behaviors Server depreciated and links panels I was more or less managed to accomplish my tasks. I'm still having trouble getting an image to display in the database of mySQL server. In the revisions of CC before it was easy and well documented. I downloaded the extension from DMXZone HTML5 data links. I can almost get my task of dynamic image, but the extension DMXZone HTML5 data links said that I now have to get the the "incomplete but functional on" DMX Zone Database Extension, in addition to the HTML5 Extension of data links to select my data source in the database.
I am thinking of dumping Dreamweaver CC altogether and just install CS6 until the path gets better paved. Any other ideas? Example of code? Work around? Thanks in advance
KevinatCirris wrote:
I recently started using Dreamweaver CC to set up a dynamic site (PHP pages with a mySQL database). With perseverance and downloading new behaviors Server depreciated and links panels I was more or less managed to accomplish my tasks. I'm still having trouble getting an image to display in the database of mySQL server. In the revisions of CC before it was easy and well documented. I downloaded the extension from DMXZone HTML5 data links. I can almost get my task of dynamic image, but the extension of data bindings DMXZone HTML5 says that I must now get the the "incomplete but functional on" DMX Zone Database Extension, in addition to the Extension of data bindings HTML5 to select my data source in the database.
I am thinking of dumping Dreamweaver CC altogether and just install CS6 until the path gets better paved. Any other ideas? Example of code? Work around? Thanks in advance
Really, you'd like any other piece of information in your database.
Store the actual images in a folder on your server and the name of the image file in the database - myImage.jpg
Then he echo the page following the convention of other data that will resonate on the page:
['images'] top being the name of the field of data base in which you stored the image name and the $row_rsRecordSetName being the variable created by the Recordset (yours will be different)
-
How to insert the value of the type in a value of type varchar date
Oracle forms 6i
Hai All
There are two tables T1, T2
T1 has these code varchar fields, the time varchar, date
T2 has these intimate date fields, outtime date intrinsically date, date of introut
I tried to change the time of Ie respondent T1 to T2
Update T2 intimate value = to_date(bartime|| bardate, «hh24mi maman-dd-yyyy»)...
It run but very well, but I got an error Ora-01861
Concerning
Srikkanth.MUpdate t2 set outtime = to_date (r1.bartime | hh24mi R1.bardate,'dd-MOM-yyyy "") that I wrote like this and it runs and I got an error 01861
One of your error is to set month format his KILLS not MOM
I guess bardate has the format DD-MON-RRRR then this request won't work
update t2 set outtime = to_date(r1.bardate||' '||r1.bartime, 'DD-MON-RRRR HH24MI') where......
---------------------
Take this into account in TO_DATE you tell Oracle that is my String don't String not really but it's date so for this, it must be said that your string contains this format date
To_date (Mystring, DateFormat);
for example
String is ' 2009/Jan/01 20:00 ' To_date would be like to_date (' 01/Jan/2009 20:00 ',' RRRR/MON/DD HH24 ')
It may be useful
If the answers are useful or correct please mark
Baig,
http://baigsorcl.blogspot.comPublished by: bamba on March 12, 2010 16:59
-
How to display multiple values read from database in a textfield
Hi all
I'm working on a feature where say if there are 3 employees in a Department and then I want to show all names (separated by commas) employees of the Department in a textfield.
do any body have any suggestions?
Thank you
Tauceef.See also:
{: identifier of the thread = 1033907}
-
I have two tables (2) RESULT TAB (1)
CREATE TABLE TAB
(
NUMBER OF SNO
A NUMBER,
B THE NUMBER.
NUMBER OF THE SUM
);
CREATE AN ARRAY OF RESULT
(
NUMBER OF SNO
NUMBER OF THE SUM
)
my doubt is:
(1) I want to insert a table TAB, my question is how to insert a column to the SUM using the column A AND B... Here im adding two values of the column and store result in the AMOUNT column.
SNO A B SUM
1 100 150 250
2 300 100 400
I want to like this, it is possible with single insert query?
(2) at the time of the insertion TAB of values that SNO, and the values of table TAB $ insert in the table of RESULTS... is it possible these two inserts at the same time?
in fact, im using another this table.fro TAB and easy to understand I write like that, please solve this problem
First, you post in the wrong forum as this one is only for Oracle's SQL developer tool. So you might ask your question in the general forum of SQL.
Second, you might solve your problems with bind variable:
Insert tab
(sno, a, b, sum)
values
(: SNO,: A: B: A + B :))
You should not use sum as column name because it is a reserved word.
More you cannot insert into two different tables with a single SQL, but you can use PL/SQL to do this:
Start
insert into tab values (: SNO,: A: B: A + B :);)
insert into result values (: SNO,: A + B :);)
end;
If you meet sno from a sequence, you could do something like this:
Start
insert into values tab (seq_sno.nextval,:,: B,: A +: B) return sno in: SNO.
insert into result values (: SNO,: A + B :);)
end;
Hope that helps,
dhalek
Maybe you are looking for
-
Sierra won't let me play youtube videos
Since I installed Sierra, youtube will not play videos. I get a message: your browser does not recognize the video formats available. It has a help page which States that the preferred format is HTML 5 so I don't see what can be the problem. I saw an
-
Vista - Error Code: 0X8000FFFF (cannot install updates)
See title - will not download them updates. Windows Vista - Home Basic Version 6 - Service pack 1 Do you have a 0x8000ffff error message
-
How to open MSWMM file on my computer
I have a MSWMM file and you want to open or save on my computer. I have Windows XP and windows movie maker. How can I do this?
-
Cannot connect since 1607 update
My computer forced Windows to update to version windows 10 1607. Can no longer use my Linksys WUSB6300 for some reason any. The program is loaded; driver is up-to-date; but does not connect. Suggestions?
-
OMG, restarted my computer and now ALL my stuff is gone! Things I saved to the desktop, documents, photos. WHERE DID HE GO? And how do I get it back?