[Insert in to table with the values of function]
Hi,
I was written the following procedure in my DB to get the values of bonuses and id from the table employee_290512
create or replace procedure ins_desc is
cursor i1 is
select id, decode (description,'Tester',salary*15,'Programmer',salary*30,'Manager',salary*30) bonus from employee_290512;
v_id employee_290512.id%type;
v_bonus employee_290512.salary%type;
Begin
open i1;
loop
fetch i1 into v_id,v_bonus;
exit when i1% notfound;
dbms_output.put_line (v_id || ' '||v_bonus);
end loop;
close i1;
end;
I written the following function by calling the above procedure inside the function to achieve the result like this
create or replace function bon_chk return number
is
v_result number;
begin
ins_desc;
return v_result;
end;
I written the above two stuffs to insert the output values of function in to the table called bonuses_proc having the values (id,bonus)
To achieve the above I executed the following query
insert into bonuses_proc (employee_id,bonus) select bon_chk from dual;
During the above it throws the error ORA-00947: not enough values
i understand the function return the v_result as onve value so it throws the above error
Could any one please clarify me on this?
Regards
Thelak
Edited by: thelakbe on Jun 5, 2012 12:00 PM
Edited by: thelakbe on Jun 5, 2012 12:01 PM
Edited by: thelakbe on Jun 5, 2012 12:01 PM
Hi,
yes we can do like above too, but i dont want to give the insert permission to the table to all the user,so is there any possiblities do it with ouput of function?If you would use the output of the function (if it had two values) you also need to do the insert as you tried to do in the initial post:
insert into bonuses_proc (employee_id,bonus) select bon_chk from dual;If you do not want insert permisions on a table for a user then you can put the whole SQL in a procedure in a schema with insert permisions and give the user exec rigth to that procedure.
The procedure can be like:
create or replace
procedure insert_bonus authid definer as
begin
insert into bonuses_proc (employee_id,bonus)
SELECT
id
,DECODE (description, 'Tester', salary*15, 'Programmer', salary*30, 'Manager', salary*30) bonus
FROM
employee_290512;
end;regards,
Peter
Similar Messages
-
How can I build a table with the time values of a timer from a while loop
Hi:
I have a question concerning building a table:
Every 100ms I read a value from a sensor (while loop with a timer). I would like to build a table with the actual time and the concerning value. For example:
0msec 1V
100msec 2V
200msec 3V
300msec 4V
etc.
If I use the Express VI for building a table, I always get the date and time, but I don't need the date and the time is in the following format: HH:MMS, which is nonsensical for me as I can't differentiate within msec. Can I change the format anywhere?
Can I also save the table to a file or even to an Excelsheet? How can I do that?
Thanks for your help!Hi Craig:
thank you very much. To solve the mystery : ) :
I want to drive a stepper motor with a specific frequency. To get the current degree value of the motor I would like to measure the current time (from the beginning of the move on). (With a formula I get the degree value out of the time)
Concurrently I would like to get data from a torque sensor and from a pressure sensor. That's why I asked you about the time and the table. The measurement should start with the movement of the motor. How can I do that? Right now I have different block diagrams (different while loops) (see attachment) and I would like to put them in one.
I haven't done the block diagram for the pressure sensor yet, so there is only the one for the torque sensor and the one for the motor.
I also would like to set a mark in the table when the voltage value of an analog input gets under a specific threshold value. Is that possible?
I'm sorry, I'm a novice in LabVIEW. But maybe you can help me.
Thank you very much!
Steffi
Attachments:
motor.vi 238 KB
sensor.vi 59 KB -
How to insert into 2 tables from the same page (with one button link)
Hi,
I have the following 2 tables....
Employees
emp_id number not null
name varchar2(30) not null
email varchar2(50)
hire_date date
dept_id number
PK = emp_id
FK = dept_id
Notes
note_id number not null
added_on date not null
added_by varchar2(30) not null
note varchar2(4000)
emp_id number not null
PK = note_id
FK = emp_id
I want to do an insert into both tables via the application and also via the same page (with one button link). I have made a form to add an employee with an add button - adding an employee is no problem.
Now, on the same page, I have added a html text area in another region, where the user can write a note. But how do I get the note to insert into the Notes table when the user clicks the add button?
In other words, when the user clicks 'add', the employee information should be inserted into the Employees table and the note should be inserted into the Notes table.
How do I go about doing this?
Thanks.Hi,
These are my After Submit Processes...
After Submit
30 Process Row of NOTES Automatic Row Processing (DML) Unconditional
30 Process Row of EMPLOYEES Automatic Row Processing (DML) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
50 Insert into Tables PL/SQL anonymous block Conditional
My pl/sql code is the same as posted earlier.
Upon inserting data into the forms and clicking the add button, I get this error...
ORA-06550: line 1, column 102: PL/SQL: ORA-00904: "NOTES": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
Error Unable to process row of table EMPLOYEES.
Is there something wrong with the pl/sql code or is it something else? -
Insert recordset in 2 tables with the same id
Hello,
I have two tables with the columns
CAR Client
clientId[FK] clientId [PK]
carId[PK] name
brand surname
type
I made a form with textfields
Brand
Surname
Name
Type
and I want thru Insert Recordset wizard to pass the cliendId in both tables.
How can I do this?You can do this by not relying on the recordset wizard and simply coding it yourself to INSERT data to tables. Or use wizard to insert into one table and modify code to allow insert into two tables.
best,
Shocker -
Trigger to update field on a table with the sum of fields on another table
My experience creating triggers and pl/sql in general can best be described in oracle terms as null. I've been practicing by creating tables and applications on my personal home server to help me with some of my work related tasks. Right now I'm trying to create a trigger that will, after insert, update, delete on the assignment_time_track table update the time_spent field on the assignments table with the sum of the time_spent fields on the assignment_time_track table. Hopefully that run on sentence there is clear to people other than myself. I've attempted to script this on my own using the trigger creation tool for Oracle Database Express Edition but I get the following error:
Trigger create was not successful for the following reason:
ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
Here is my attempt at creating the trigger on my own.
create or replace trigger "ASSIGNMENT_TIME_TRACK_T1"
AFTER
insert or update or delete on "ASSIGNMENT_TIME_TRACK"
for each row
begin
update assignments
set time_spent = (select sum(time_spent)
from assignment_time_track
where assignment_time_track.name = assignments.name);
end;
If what I've posted isn't clear or more detail is needed, let me know and I'll respond with a complete description of both tables and my goals for each table. Thanks in advance for any help. I will also gladly accept links to tutorials or lessons that explain how to do this sort of thing.
Edited by: bobonthenet on Mar 9, 2009 2:01 PMHi,
If the assignments table has only one row per assignment, why is the primary key the combination of name and time_spent? If you have two two assignments called "Lab Report", isn't it possible that you would spend the same amount of time on each of them? I suggest using a sequence to assign an arbitrary id number to each assignment, and use that as the primary key.
What does each row in assuignment_time_track represent? It sounds like it is a chunk of time spent on one assignment (that is, you want to know that you spent 90 minutes on Tudesday morning working on some assignment, and that you spent another 30 minutes on Tuesday afternoon working on the same assignment). If so, then there should be a foreign key constraint in assignment_time_track referencing the primary key of assignemnt, and not the other way around.
Alex is right; you can get the total time spent on each project in a query or view; there is no need to replicate that data.
If you're new to Oracle and SQL, you should invest your time in getting more experience with the basics: everyday things like queries (using joins and GROUP BY) and views, and not spend much time on things that aren't used that much, like triggers.
If you really did have to copy the data, then you could have a trigger on assignemnt_time_track that kept the total in assignment up to date, like this:
UPDATE assignment
SET total_time_spent = total_time_spent
+ NVL (:NEW.time_spent, 0)
- NVL (:OLD.time_spent, 0);I suggest you name the column in assignment something different than the column in assignment_time_track, to reduce the risk of confusion. Also, since they represent different things, the same name can't be the most descripttive for each of them.
In case you're wondering about the use of NVL, above: It allows the same statement to take care of the situation when you INSERT, UPDATE or DELETE a row in assignment_time_track. That is, if you UPDATE a row in assignment_time_track, and change the time_spent from 60 to 90, then you want to add the new time (90) and subtract the old time (60) fro the total_time_spent in assignment: that is, total_time_spent would increase by 30. If you INSERT a new row into assignment_time_track with time_spent=30, you just need to add the new time_spent (30): there is nothing to subtract. But rather than write an IF statement and a second UPDATE for that situation, you can just rely on hte fact that all :OLD values are NULL iwhen INSERTing, and treat that NULL as a 0. Likewise, when DELETing, all :NEW values are NULL.. -
How to encrypt column of some table with the single method ?
How to encrypt column of some table with the single method ?
How to encrypt column of some table with the single
method ?How to encrypt column of some table with the single
method ?
using dbms_crypto package
Assumption: TE is a user in oracle 10g
we have a table need encrypt a column, this column SYSDBA can not look at, it's credit card number.
tha table is
SQL> desc TE.temp_sales
Name Null? Type
CUST_CREDIT_ID NOT NULL NUMBER
CARD_TYPE VARCHAR2(10)
CARD_NUMBER NUMBER
EXPIRY_DATE DATE
CUST_ID NUMBER
1. grant execute on dbms_crypto to te;
2. Create a table with a encrypted columns
SQL> CREATE TABLE te.customer_credit_info(
2 cust_credit_id number
3 CONSTRAINT pk_te_cust_cred PRIMARY KEY
4 USING INDEX TABLESPACE indx
5 enable validate,
6 card_type varchar2(10)
7 constraint te_cust_cred_type_chk check ( upper(card_type) in ('DINERS','AMEX','VISA','MC') ),
8 card_number blob,
9 expiry_date date,
10 cust_id number
11 constraint fk_te_cust_credit_to_cust references te.customer(cust_id) deferrable
12 )
13 storage (initial 50k next 50k pctincrease 0 minextents 1 maxextents 50)
14 tablespace userdata_Lm;
Table created.
SQL> CREATE SEQUENCE te.customers_cred_info_id
2 START WITH 1
3 INCREMENT BY 1
4 NOCACHE
5 NOCYCLE;
Sequence created.
Note: Credit card number is blob data type. It will be encrypted.
3. Loading data encrypt the credit card number
truncate table TE.customer_credit_info;
DECLARE
input_string VARCHAR2(16) := '';
raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
key_string VARCHAR2(8) := 'AsDf!2#4';
raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(key_string,'AL32UTF8','US7ASCII'));
encrypted_raw RAW(2048);
encrypted_string VARCHAR2(2048);
BEGIN
for cred_record in (select upper(CREDIT_CARD) as CREDIT_CARD,
CREDIT_CARD_EXP_DATE,
to_char(CREDIT_CARD_NUMBER) as CREDIT_CARD_NUMBER,
CUST_ID
from TE.temp_sales) loop
dbms_output.put_line('type:' || cred_record.credit_card || 'exp_date:' || cred_record.CREDIT_CARD_EXP_DATE);
dbms_output.put_line('number:' || cred_record.CREDIT_CARD_NUMBER);
input_string := cred_record.CREDIT_CARD_NUMBER;
raw_input := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
dbms_output.put_line('> Input String: ' || CONVERT(UTL_RAW.CAST_TO_VARCHAR2(raw_input),'US7ASCII','AL32UTF8'));
encrypted_raw := dbms_crypto.Encrypt(
src => raw_input,
typ => DBMS_CRYPTO.DES_CBC_PKCS5,
key => raw_key);
encrypted_string := rawtohex(UTL_RAW.CAST_TO_RAW(encrypted_raw)) ;
dbms_output.put_line('> Encrypted hex value : ' || encrypted_string );
insert into TE.customer_credit_info values
(TE.customers_cred_info_id.nextval,
cred_record.credit_card,
encrypted_raw,
cred_record.CREDIT_CARD_EXP_DATE,
cred_record.CUST_ID);
end loop;
commit;
end;
4. Check credit card number script
DECLARE
input_string VARCHAR2(16) := '';
raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
key_string VARCHAR2(8) := 'AsDf!2#4';
raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(key_string,'AL32UTF8','US7ASCII'));
encrypted_raw RAW(2048);
encrypted_string VARCHAR2(2048);
decrypted_raw RAW(2048);
decrypted_string VARCHAR2(2048);
cursor cursor_cust_cred is select CUST_CREDIT_ID, CARD_TYPE, CARD_NUMBER, EXPIRY_DATE, CUST_ID
from TE.customer_credit_info order by CUST_CREDIT_ID;
v_id customer_credit_info.CUST_CREDIT_ID%type;
v_type customer_credit_info.CARD_TYPE%type;
v_EXPIRY_DATE customer_credit_info.EXPIRY_DATE%type;
v_CUST_ID customer_credit_info.CUST_ID%type;
BEGIN
dbms_output.put_line('ID Type Number Expiry_date cust_id');
dbms_output.put_line('-----------------------------------------------------');
open cursor_cust_cred;
loop
fetch cursor_cust_cred into v_id, v_type, encrypted_raw, v_expiry_date, v_cust_id;
exit when cursor_cust_cred%notfound;
decrypted_raw := dbms_crypto.Decrypt(
src => encrypted_raw,
typ => DBMS_CRYPTO.DES_CBC_PKCS5,
key => raw_key);
decrypted_string := CONVERT(UTL_RAW.CAST_TO_VARCHAR2(decrypted_raw),'US7ASCII','AL32UTF8');
dbms_output.put_line(V_ID ||' ' ||
V_TYPE ||' ' ||
decrypted_string || ' ' ||
v_EXPIRY_DATE || ' ' ||
v_CUST_ID);
end loop;
close cursor_cust_cred;
commit;
end;
/ -
Dynamic Internal Table with the same name
Hey Guys
I have a question.
I know that we can create dynamic internal table taking a struct dynamically.
But I have 2 ques on the same subject.
1. Can we create an internal table based on a type that we have locally declared eg
types: begin of ty_demo.
var1(1) type c,
var2 type p,
end of ty_demo.
2. If an internal table is already declared based on the above type say data: i_tab type standard table of ty_demo.
If i need to enhance the struct of this internal table. Can i do that by dynamically redefining it based on a different structure but keepin the same name i_tab.
In a nut shell I cannot change the name of my itab but I want to enhance the structure.
I Hope I am clear.
Help will be greatly apprcieated.
Thanks
Sameerhai.
we can create an internal table based on a type that we have locally declared, but you have to use data instead of types like.
data: begin of ty_demo.
var1(1) type c,
var2 type p,
end of ty_demo.
check the example notes for dynamic itab .
Dynamic internal table is internal table that we create on the fly with flexible column numbers.
For sample code, please look at this code tutorial. Hopefully it can help you
Check this link:
http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
Sample code:
DATA: l_cnt(2) TYPE n,
l_cnt1(3) TYPE n,
l_nam(12),
l_con(18) TYPE c,
l_con1(18) TYPE c,
lf_mat TYPE matnr.
SORT it_bom_expl BY bom_comp bom_mat level.
CLEAR: l_cnt1, <fs_dyn_wa>.
Looping the component internal table
LOOP AT it_bom_expl INTO gf_it_bom_expl.
CLEAR: l_cnt1.
AT NEW bom_comp.
CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
For every new bom component the material data is moved to
temp material table which will be used for assigning the levels
checking the count
it_mat_temp[] = it_mat[].
Component data is been assigned to the field symbol which is checked
against the field of dynamic internal table and the value of the
component number is been passed to the dynamic internal table field
value.
ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
<fs_check>.
<fs_check> = gf_it_bom_expl-bom_comp.
ENDAT.
AT NEW bom_mat.
CLEAR l_con.
ENDAT.
lf_mat = gf_it_bom_expl-bom_mat.
Looping the temp internal table and looping the dynamic internal table
*by reading line by line into workarea, the materialxxn is been assigned
to field symbol which will be checked and used.
LOOP AT it_mat_temp.
l_nam = c_mat.
l_cnt1 = l_cnt1 + 1.
CONCATENATE l_nam l_cnt1 INTO l_nam.
LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
ENDLOOP.
IF <fs_xy> = lf_mat.
CLEAR lf_mat.
l_con1 = l_con.
ENDIF.
Checking whether the material exists for a component and if so it is
been assigned to the field symbol which is checked against the field
of dynamic internal table and the level of the component number
against material is been passed to the dynamic internal table field
value.
IF <fs_xy> = gf_it_bom_expl-bom_mat.
ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
CLEAR l_con.
MOVE gf_it_bom_expl-level TO l_con.
CONCATENATE c_val_l l_con INTO l_con.
CONDENSE l_con NO-GAPS.
IF l_con1 NE space.
CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
CLEAR l_con1.
l_cnt = l_cnt - 1.
ENDIF.
<fs_check> = l_con.
l_cnt = l_cnt + 1.
ENDIF.
ENDLOOP.
AT END OF bom_comp.
At end of every new bom component the count is moved to the field
symbol which is checked against the field of dynamic internal table
and the count is been passed to the dynamic internal table field
value.
ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
<fs_check> = l_cnt.
INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
ENDAT.
ENDLOOP.
regards.
sowjanya.b -
Populate target table with default value
I have a query like this:
SELECT 0 AS ID,
9999999999 AS CODE
FROM DUAL
UNION ALL
SELECT VEH.TP_ID AS ID,
VEH.VEH_ID AS CODE
FROM TB_VEHICLE;
So I have an interface with two data sets, one for each query.
The first data set represents the "select from dual" "constant values" and the second represents the "select * from tb_vehicle".
In the first data set I don´t have a source, then ODI generates a select without a table "select 0 AS ID, 99999 AS CODE FROM".
Any ideas on how can I achieve my objective? I need to populate one row on target table with constant values.
ThanksAlternatively , try this :
Duplicate the LKM and IKM you are using, create copies , something like LKM xyz (No Source) , IKM xyz (No Source).
Then adust the KM steps accordingly, remove the 'FROM' part and replace with VALUES ( ) , keeping the odiref substitution call in the parenthesis.
So you basically have a knowlede module that accepts no source data, generating :
insert into C$
(col 1, col 2, col 3 etc)
VALUES
(Target mapping 1, target mapping 2, target mapping 3 etc)
I've seen it done, nice and tidy, keeps all the lineage in ODI etc. -
Insert into two tables with a single query (same ID)
Hello,
I want to insert two tables at the same time ( with a single query) provided that both records get inserted with the same id. How do I do this?
Table Movies
id
name
Table Category
movie_id
cat_typea) Insert into first table, retrieve the id (may be by using my_sequence.currval and then insert into another table.
issue: Makes three query to the db, I am also guessing that when multiple people try to insert there will be an issue, I might be wrong.
I don't have any other idea.
Greatly appreciated!Why don't use multitable insert ? It's available from 9i.
A sequence.nextval will return the same value within the whole instruction
so all records can be inserted with the same id.
Look at this example:
DROP TABLE A;
DROP TABLE B;
drop sequence a_seq;
CREATE TABLE A(
ID NUMBER,
FIRSTNAME VARCHAR2(50)
CREATE TABLE B AS
SELECT id, firstname lastname FROM a;
CREATE SEQUENCE a_seq
START WITH 1;
INSERT ALL
INTO A(ID, FIRSTNAME) VALUES(A_SEQ.NEXTVAL, FNAME)
INTO B(ID, LASTNAME) VALUES(A_SEQ.NEXTVAL, LNAME)
SELECT 'fname ' || LEVEL FNAME, 'lname ' || LEVEL LNAME
FROM DUAL
CONNECT BY LEVEL < 10
COMMIT;
SELECT * FROM A;
SELECT * FROM b;
DROP TABLE A succeeded.
DROP TABLE B succeeded.
drop sequence a_seq succeeded.
CREATE TABLE succeeded.
CREATE TABLE succeeded.
CREATE SEQUENCE succeeded.
18 rows inserted
commited
ID FIRSTNAME
3 fname 1
4 fname 2
5 fname 3
6 fname 4
7 fname 5
8 fname 6
9 fname 7
10 fname 8
11 fname 9
9 rows selected
ID LASTNAME
3 lname 1
4 lname 2
5 lname 3
6 lname 4
7 lname 5
8 lname 6
9 lname 7
10 lname 8
11 lname 9
9 rows selected -
Call transaction in new session with the value at hotspot
Hi all,
As a hotspot functionality I would like to open a new transaction in a new session with the value at hotspot. For that reason, I am using the FM ABAP4_CALL_TRANSACTION with the option STARTING NEW TASK.
This FM is not working because Parameter ID is not Maintained for the field (Hotspoted). So no value is passing to new transaction.
Please suggest any other way to implement this.
ThanksHi Anil..
This is the Solution for ur Requirement. try this program and change as per ur need.
REPORT ZSEL_CALL_TCODE.
data : IT_KNA1 TYPE TABLE OF KNA1 WITH HEADER LINE.
DATA : IT_SPA TYPE TABLE OF RFC_SPAGPA WITH HEADER LINE.
SELECT * FROM KNA1 INTO TABLE IT_KNA1 .
LOOP AT IT_KNA1 .
WRITE:/ IT_KNA1-KUNNR HOTSPOT ON.
HIDE IT_KNA1-KUNNR .
ENDLOOP.
CLEAR IT_KNA1-KUNNR.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN 1.
IF IT_KNA1-KUNNR IS NOT INITIAL.
REFRESH IT_SPA.
IT_SPA-PARID = 'KUN'.
IT_SPA-PARVAL = IT_KNA1-KUNNR.
APPEND IT_SPA.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'S1'
EXPORTING
TCODE = 'XD02'
SKIP_SCREEN = ' '
MODE_VAL = 'A'
UPDATE_VAL = 'A'
IMPORTING
SUBRC =
TABLES
USING_TAB =
SPAGPA_TAB = IT_SPA
MESS_TAB =
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDCASE.
<b>Reward if Helpful.</b> -
IN which table stores the Value of sales orders Net Value
IN which table stores the Value of sales orders Net Value
Hi Lakshmi,
Check Following Tables:
CRMD_PRICING_I
CRMM_PR_SALESA
CNCCRMPRSAP00090
Reward Points if Helpful.
Srini. -
Hi ,
We have enabled context sensitive DFF in Bank Branch Page for HZ_PARTIES DFF , We have created Flex Map so that only bank branch context fields are only displayed in the bank branch page and as we know party information DFF is shared by supplier and Customer Page so we dint want to see any Bank Branch fields or context information in those pages.
We have achieved the requirement but when open existing branches bank branch update is throwing below error message :
"The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assistance."
this error is thrown only when we open existing branches, if we save existing branch and open then it is not throwing any error message.
Please let us know reason behind this error message.
Thanks,
MrudualaYou are kidding? It took me about 3 minutes to scroll down on my tab to get to the triplex button!
Habe you read the error message?
Quote:
java.sql.SQLSyntaxErrorException: ORA-04098: trigger 'PMS.PROJECT_SEQ' is invalid and failed re-validation
Check the trigger and it should work again.
Timo -
How can I get the variable with the value from Thread Run method?
We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
How can I get the variable with the value?
This is sample code:
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run method "+sathr.x);
// I should get Inside the run method::: But I get only Inside
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to read it from external method. This I dont want to doWe want to access a variable from the run method of a
Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
Even
though I make the variable as public /public static, I
could get the value till the end of the run method
only. After that scope of the variable gets lost
resulting to null value in the called method/class..
I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
public class SampleSynchronisation
public static void main(String[] args)
SampleSynchronisation app = new SampleSynchronisation();
public SampleSynchronisation()
MyRunnable runner = new MyRunnable();
new Thread(runner).start();
// yield this thread so other thread gets a chance to start
Thread.yield();
System.out.println("runner's X = " + runner.getX());
class MyRunnable implements Runnable
String X = null;
// this method called from the controlling thread
public synchronized String getX()
return X;
public void run()
System.out.println("Inside MyRunnable");
X = "MyRunnable's data";
} // end class MyRunnable
} // end class SampleSynchronisation>
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run
method "+sathr.x);
// I should get Inside the run method::: But I get
only Inside
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to
read it from external method. This I dont want to do -
How can I get the variable with the value from Thread's run method
We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
How can I get the variable with the value?
This is sample code:
public class SampleSynchronisation
public static void main(String df[])
sampleThread sathr= new sampleThread();
sathr.start();
System.out.println("This is the value from the run method "+sathr.x);
/* I should get:
Inside the run method
But I get only:
Inside*/
class sampleThread extends Thread
public String x="Inside";
public void run()
x+="the run method";
NB: if i write the variable in to a file I am able to read it from external method. This I dont want to doYour main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.
-
Is there a way to determine which rows are inserted in JDT1 table by the system automatically?
Hi,
Is there a way to determine which rows are inserted in JDT1 table by the system automatically? Example, many GLs which are mapped in GL Account Determination, like Foreign Exchange Gain / Loss, Rounding Account, etc. are inserted by the system automatically in the Journal Entry on various scenarios, like during Incoming Payment, etc.
Which SQL query can give me those rows? Basically the WHERE condition should be based on which column or multiple columns in JDT1 table?
Thanks.Hi Rajesh,
I'm not entirely sure but I think the TransId is the same in the header that belongs to the transaction.
OINV.TransId = JDT1.TransId
Best regards,
Pedro Magueija
Maybe you are looking for
-
hi all, I am using oracle 10g version. I have one table but i do not have any unique id to identify the row. I want to have a unique id temporarily in my select statement (dynamic sql) in a stored procedure while fetching the results, so that i can r
-
How can I regain 10.8.5 coloring of icon names?
I've spent years organising files and folders visually based on colors--used against specifically chosen (contrasting) backgrounds. Within specific folders I had been using colors to group certain files, and by using different colors for different gr
-
CTRL-Tab isn't working anymore in Indesign CC nor in CC (2014)
Hi, I use to switch between open documents using the CTRL-TAB and CTRL-SHIFT-TAB in Indesign. Since we have upgraded to CC and now CC (2014) it seems that Indesign refuses to use these shortcuts. All tough it's possible to assign them, they just do n
-
PSU patch info for E business release 12.1.2.
Can some one please let me know the document or procedure which should refer to apply PSU patch for E business suite. Do we have to apply two patches separately for Ebusiness suite database - 11.2.0.3 and application server? Please help. I need an i
-
ICloud Kills ALL iPhone Email Ability
Hi, Just enabled iCloud for contacts and calendar on my iPhone 3GS yesterday (it has the latest version of iOS 5). I also use my phone for 2 personal email accounts plus my Exchange account. With iCloud enabled, my email does not synch on ANY of my a