Resource configuration for updating multiple tables
Hi all,
My aim is to update multiple tables in Sun Identity Manager
I would like to know what is the resource to be configured for this
Could any one help me in solving this issue
Thanks in advance,
Shalini
I have used the Scripted JBDC resource as follows;
go to Resources > Configure Types and select Scripted JDBC > Save
at Resources, select resource Type Actions > New Resource
select Scripted JDBC from the drop down, this should start the wizard
the wizard will guide you with lots of questions.
The one problem we had is in the Action Scripts (second wizard page). we found the example scripts
at the webserver root /idm/sample/ScriptedJdbc/SimpleTable/beanshell
the above scripts had to be modified to the SQL required for the application, but it worked well with the example databases and codes that it is easily understood.
there are several examples of different table types here... there are lots of options, see the README iles for each type
hope this helps;
TG
Similar Messages
-
API for updating pay_people_groups table..
Hi,
Is there any API for updating pay_people_groups table. I know we can do it using hr_assignment_api.update_emp_asg_criteria but this API updates the assignement with the new pay_group_id. I want to know is there is any API which can only update the pay_people_groups and not the assignment.
Regards,
Shabana.Hi,
Technically you want update values for people group. If you remember At the time of definition of people group you created value set and attached people group flex field.
People group are created on the basis of combination of segments. So you have to update only values not people group.
I doubt oracle provides API to update key flex field.
You may get API to update values try out that option.
Hope this helps.
Sathish -
XD02 transaction to change the customer data for updating KNA1 table?
Hi all,
How can we use XD02 transaction to change the customer data for updating KNA1 table?
Give the steps.
Thanks in advance
rkHi KR,
Why don't u use BDC to run XD02.
With Regards,
Zafar Ali -
Updating multiple tables using JDBC Adapter
Hi,
I am trying to insert/update multiple tables using one message via JDBC adapter. The following is the message being posted. However, only the first statement was executed. Anything wrong?
Thanks in advance!
Hart
<?xml version="1.0" encoding="UTF-8"?>
<ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration"><DeliveryData><DelHeader action="UPDATE_INSERT"><table>DelHeader</table><access><DelNo>0080000230</DelNo><DelType>LF</DelType><XOverwrite>X</XOverwrite><ShipTo>0000000026</ShipTo><SoldTo>0000000026</SoldTo><Priority>00</Priority><DocDate>02/17/2007</DocDate><GText>CIF Test</GText><DelDate>02/20/2007</DelDate><PickDate>02/20/2007</PickDate><ShipPoint>NO02</ShipPoint><PackCount>00000</PackCount></access><key><DelNo>0080000230</DelNo></key></DelHeader>
<DelItem action="INSERT"><table>DelItem</table><access><DelNo>0080000230</DelNo><ItemNo>000010</ItemNo><GText>10# GRAN-GREAT VALUE</GText><Material>G04410G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BL</UOM></access><access><DelNo>0080000230</DelNo><ItemNo>000020</ItemNo><GText>25# GRAN- GREAT VALUE</GText><Material>G04025G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BG</UOM></access></DelItem></DeliveryData></ns0:DeliveryDBUpdate>Hi,
You need 2 STATEMENT level tags,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration">
<b><DeliveryData1></b>
<DelHeader action="UPDATE_INSERT">
<table>DelHeader</table>
<access>
<DelNo>0080000230</DelNo>
<DelType>LF</DelType>
<XOverwrite>X</XOverwrite>
<ShipTo>0000000026</ShipTo>
<SoldTo>0000000026</SoldTo>
<Priority>00</Priority>
<DocDate>02/17/2007</DocDate>
<GText>CIF est</GText>
<DelDate>02/20/2007</DelDate>
<PickDate>02/20/2007</PickDate>
<ShipPoint>NO02</ShipPoint>
<PackCount>00000</PackCount>
</access>
<key>
<DelNo>0080000230</DelNo>
</key>
</DelHeader>
<b><DeliveryData1></b>
<b><DeliveryData2></b>
<DelItem action="INSERT">
<table>DelItem</table>
<access>
<DelNo>0080000230</DelNo>
<ItemNo>000010</ItemNo>
<GText>10# GRAN-GREAT VALUE</GText>
<Material>G04410G611</Material>
<Plant>6005</Plant>
<SLoc>6005</SLoc>
<RefDoc>mmenon32</RefDoc>
<RefItem>00000000</RefItem>
<DelQty>5.000</DelQty>
<UOM>BL</UOM>
</access>
<access>
<DelNo>0080000230</DelNo>
<ItemNo>000020</ItemNo>
<GText>25# GRAN- GREAT VALUE</GText>
<Material>G04025G611</Material>
<Plant>6005</Plant>
<SLoc>6005</SLoc>
<RefDoc>mmenon32</RefDoc>
<RefItem>00000000</RefItem>
<DelQty>5.000</DelQty>
<UOM>BG</UOM>
</access>
</DelItem>
<b></DeliveryData2></b>
</ns0:DeliveryDBUpdate>
Try with such a strcuture and let us know if it works.
Regards
Bhavesh -
Hi All, Is there any way to update multiple tables in a single query. I know we can write triggers. Apart from triggers, is there any other way available in SQL Server. I am using 2008R2.
As alternative you can write something like that
BEGIN TRANSACTION
BEGIN TRY
Update
Update
Update
COMMIT
END TRY
BEGIN CATCH
IF @@TRANCOUNT> 0 ROLLBACK
END CATCH;
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to update multiple tables using results from query
I'm a bit rusty on this stuff and am hoping for some help.
Table 1 is:
location_id, location_name
Table 2 is
location_id, employee_id and misc. other columns
Then there are multiple tables with associated data, keys being location_id and employee_id.
There are no established relationships.
Trying to come up with a process to change location_id for all employees assigned to a particular location.
It seems to me that the basics are
select employee_id from Table2 where location_id='xxxxxx'
Then take each employee_id returned and change their location_id in each of the other tables
I'm not clear on how to load the returned employee id's as variables and then loop through them.
ThanksThanks for the welcome. I'll read up on the rules now.
Below is the DDL for a couple of the tables.
Version = 11g
I would query the users table for all users with a certain site_id and then use them to update the site_id in the users table (and other tables)
-- DDL for Table USERS
CREATE TABLE "USERS"
( "USERID" VARCHAR2(8 BYTE),
"PASSWORD" VARCHAR2(50 BYTE),
"FIRST_NAME" VARCHAR2(50 BYTE),
"LAST_NAME" VARCHAR2(50 BYTE),
"SITE_ID" VARCHAR2(5 BYTE),
"ROLE_ID" VARCHAR2(1 BYTE)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "SITES_DATA_TS"
CACHE ;
-- DDL for Table EMPLOYEE_PROFILE
CREATE TABLE "EMPLOYEE_PROFILE"
( "EMPLOYEEID" VARCHAR2(9 BYTE),
"PROGRAM" NUMBER,
"REQUIREMENT" NUMBER,
"JOBNUM" VARCHAR2(50 BYTE),
"STATUS" VARCHAR2(50 BYTE),
"PROGRAM_TYPE" VARCHAR2(50 BYTE),
"SITE_ID" VARCHAR2(5 BYTE),
"NUM_QUAL_TEST_ATTEMPTS" NUMBER(7,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "SITES_DATA_TS"
CACHE ; -
Delta Calculation and Updating multiple tables
We pull data from a System of Records table that contains the most up to date information. The information changes daily so we have a delta process to identify what new records were added, which records were deleted (records that are not found in the table as compared to yesterday) and which were updated. Delta process compares the already loaded data with the newly updated SOR data to find the differences.
Once the delta is established, either new records get added or existing records get updated or existing records are marked as inactive (Deletes). Additions and Updates generally happen across multiple destination tables.
Updates are identified by looking at different columns to see if any one column is changed. These columns end up in different tables.
Example
Source Delta Table, S1
ID COL1 COL2 COL3 ACTION
1 abc xyz pqr A
2 bcd lmn def U
S1.Col1 maps to Destination Table D1.Col23
S1.Col2 maps to Destination Table D2.Col45
S1.Col3 maps to Destination Table D3.Col11
Currently all tables are updated irrespective of whether the relevant data has changed or not (All 3 destination tables are updated).
I would like to know which of the Columns for a given row has changed values so that I can update only the relevant tables.
Thus if additional columns are available that act as flags
Source Delta Table, S1
ID COL1 COL2 COL3 ACTION COL1 COL2 COL3
1 abc xyz pqr A - - -
2 bcd lmn def U N Y N
3 kjh qwe iop U Y Y N
then for incoming ID=2, I just have to update Destination Table D2 and not D1 and D3
for incoming ID= 3, I have to update Destination Tables D1 and D2 but not D3.
How can I achieve that?
This is mainly to improve performance as the processing time is very short - Faster the delta processing, better will it be.
Thanks in advance.Thanks for your response.
My question was more towards establishing what has changed.
Given a table, which is updated daily, how does one efficiently establish which data has changed?
Here is an example to clarify my question further
The Source table has the following data on a particular day
Data in Source table on Monday
ID Col1 Col2 Col3
1 abc bcd cde
2 def efg fgh
3 ghi hij ijk
4 jkl klm lmn
Copy of the above data is stored in a Old Data table
Data in Source table on Tuesday
ID Col1 Col2 Col3
1 bac bcd cde
2 def gfe fgh
3 ghi jih jik
5 mno nop opq
Data in Source Table is compared with data in Old Data Table
Delta established by comparing Source Table with Old Data Table
ID Col1 Col2 Col3 Delta_Flag
1 bac bcd cde U
2 def gfe fgh U
4 D
5 mno nop opq A
Rows with IDs 1 & 2 were updated - thus to be updated
Row with ID 3 - no change so not seen in delta
Row with ID 4 was not found - thus to be deleted
Row with ID 5 was new - To be added
I can do the above easily. I would like to a step further to be able to say for updates
Row with ID 1 has Col1 changed
Row with ID 2 has Col2 and Col3 changed
Is there an easy way to do this? -
User exit/BADI for updating custom table in MB1B transaction-
Dear All,
When performing a material to material conversion in MB1B transaction for batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
Kindly suggest a user exit/BAIi available for updating the same in the custom table.
Regards,
DeepakDeepak, Exits for MB1B are
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc. -
Performance manager sql action rule for updating metric table
Hi, I need to update metric stop_date using a sql action rule (Performance Manager execute sql action rule). My problem is I can't update stop_date into the PM Repository Database. Sql action database connection is properly set, but when I set sql for executing update in table ci_probe and I schedule the rule the system doesn't seem to connect to Database (the rule run successfully, but the table ci_probe is not updated). I don't understand if the problem is database connection or wrong sql code.
Can Anyone help me with suggestions or sql action rule samples?
Thanks
Luigi
Edited by: Luigi Oliva on Jun 13, 2008 1:32 PMHi It's working, Problem was in repeat_interval it's working now,
Thanks,
I changed
repeat_interval => 'FREQ=DAILY;BYSECOND=10',to
repeat_interval => 'FREQ=SECONDLY;BYSECOND=10',Thanks,
Edited by: NSK2KSN on Jul 26, 2010 11:14 AM -
How to write a procedure for update the table
Hi all
can any body please tell me how to write a procedure to update the table......
I have a table with about 10,000 records...........Now I have add a new column and I want to add values for that like
registration Code Creidits
13213 BBA
1232 MCS
I had add the creidit now i want to update the table.........the new value want to get by SQL like
Creidit = select creidit from othere_table...........
Hope u can understand my problem
Thanks in advance
Regards
Shayan
[email protected]Please try the following --
update Program_reg a
set TotalCreidit = ( select tot_cr <Accroding to your logic>
from Program_reg b
where a.Registration = b.Registration
and a.Enrollment = b.Enrollment
and a.code = b.code
where a.Registration in ( select distinct Registration
from Program_reg );
N.B.: Not Tested....
Regards.
Satyaki De. -
Insert/update multiple tables from one form.
I'm working on an app. that requires the user to fill out a form. The contents from the form is then used to either insert new records or update existing records in multiple tables. Is that possible? Can someone give a details example?
You should create a form like you would create it having one table. Use row_id as primary key. The rest of the process are done by the triggers - those will take care of updating the right table depending which column was hit.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
FOR UPDATE OF table.field
Why does the following not work
create table division (code varchar2(2) primary key, div_desc varchar2(20));
insert into division values ('01', 'Ninja assassins');
insert into division values ('02', 'Working for the man');
create table employees (tk number, first_name varchar2(10), last_name varchar2(10), code varchar2(2) references division(code));
insert into employees values (1, 'Chuck', 'Smith', '01');
insert into employees values (2, 'John', 'Smith', '02');
DECLARE
CURSOR my_csr IS
Select e.tk, e.first_name, e.last_name
From employees e, division d
Where e.code = d.code
and e.code = '01'
and e.last_name = 'Smith'
For update;
cnt_updated NUMBER;
BEGIN
cnt_updated := 0;
FOR my_row IN my_csr
LOOP
Update employees
Set last_name = 'Forbes'
Where current of my_csr;
cnt_updated := cnt_updated + SQL%ROWCOUNT;
dbms_output.put_line('You updated '||cnt_updated||' records');
END LOOP;
END;but just adding to the "for update" clause allows for an update?
DECLARE
CURSOR my_csr IS
Select e.tk, e.first_name, e.last_name
From employees e, division d
Where e.code = d.code
and e.code = '01'
and e.last_name = 'Smith'
For update *of e.tk*;We found this out recently, and fellow Developers are asking "Why?". Is there a documented reason, or is that just how it is?
Thanks,
--=ChuckIt is not about locking it is how oracle translate the "where current". it is a simple rowid.
did a little trace, and look what I got from 10046 trace file:
For the update without the "update of", look at the 0 at the cr in the plan,
Oracle already knows that this update will not do anything:
PARSING IN CURSOR #6 len=62 dep=1 uid=82 oct=6 lid=82 tim=88904356722 hv=1877266405 ad='1a9b0404' sqlid='5a5zpz5ry9mz5'
UPDATE EMPLOYEES_T SET LAST_NAME = 'Forbes' WHERE ROWID = :B1
END OF STMT
PARSE #6:c=0,e=258,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=88904356717
BINDS #6:
Bind#0
oacdty=208 mxl=3950(3950) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=206001 frm=00 csi=00 siz=3952 off=0
kxsbbbfp=0c2ef090 bln=3950 avl=00 flg=05
EXEC #6:c=0,e=1108,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=88904357955
STAT #6 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE EMPLOYEES_T (cr=0 pr=0 pw=0 time=0 us)'
STAT #6 id=2 cnt=0 pid=1 pos=1 obj=74422 op='TABLE ACCESS BY USER ROWID EMPLOYEES_T (cr=0 pr=0 pw=0 time=0 us cost=1 size=29 card=1)'for the update with the "update of", look at the 1 at the cr in the plan:
PARSING IN CURSOR #6 len=62 dep=1 uid=82 oct=6 lid=82 tim=88913977309 hv=1877266405 ad='1a9b0404' sqlid='5a5zpz5ry9mz5'
UPDATE EMPLOYEES_T SET LAST_NAME = 'Forbes' WHERE ROWID = :B1
END OF STMT
PARSE #6:c=0,e=87,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,tim=88913977304
BINDS #6:
Bind#0
oacdty=208 mxl=3950(3950) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=206001 frm=00 csi=00 siz=3952 off=0
kxsbbbfp=09f3abfc bln=3950 avl=13 flg=05
value=
Dump of memory from 0x09F3ABFC to 0x09F3AC09
9F3ABF0 22010001 [..."]
9F3AC00 000400B6 00780401 00000000 [......x.....]
EXEC #6:c=0,e=379,p=0,cr=1,cu=1,mis=0,r=1,dep=1,og=1,tim=88913977802
STAT #6 id=1 cnt=1 pid=0 pos=1 obj=0 op='UPDATE EMPLOYEES_T (cr=1 pr=0 pw=0 time=0 us)'
STAT #6 id=2 cnt=1 pid=1 pos=1 obj=74422 op='TABLE ACCESS BY USER ROWID EMPLOYEES_T (cr=1 pr=0 pw=0 time=0 us cost=1 size=29 card=1)'Also notice that in the update version with the "update of" we can see dump of memory.
There are some binds type that oracle won't show directly in the dump (e.g. timestamp, rowid, etc)
For future, more hex oriented readers here is the rowid from table:
SQL> select rowid from employees_t;
ROWID
AAASK2AAEAAAQR4AAAIf, somebody out there, can show me a way to read the memory dump back into the real rowid,
I will be very happy.
Amiel -
Add a Select List to a Report, for Updating a table.
I am working on Apex 3.0. I had to allow the Report could update a table. I added two checkbox to the report, and now I should add a Select List. I've tried a lot of ways but I don't know how can I pass the value selected, related to the ID of the row. I've tried with a JavaScript but I couldn't. A process should update the row on the DB when the user change the value on the select list. There is a save button that perform the process. How I could pass the ID of the row and the value to a PL/SQL process?
Many Thanks for your suggestions.
SELECT PFA.FOCUS_AREA_ID
,FOCUS_AREA_NAME,
apex_item.checkbox(1, FA.FOCUS_AREA_ID, DECODE(PFA.FOCUS_AREA_ID, null, ' ','checked="checked" ') ||
'id="chk'||rownum||'"'|| ' onclick="checking(this)" ') as Focus_AREA_CHK,
APEX_ITEM.SELECT_LIST(
*5,*
PFA.FOCUS_TYPE,
*'DIS;DIS,ENG;ENG,EXP;EXP,TGT;TGT',*
*'id="sl_'||FA.FOCUS_AREA_ID||' " ',*
*'YES',*
NULL,
*'-Select-',*
*DECODE(PFA.FOCUS_AREA_ID, null, 'disabled="disabled" ','' ) || ' --onchange="selectedElement(this)" ',*
*'NO'*
*)* "Type"
FROM PROGRAM_FOCUS_AREAS PFA,
FOCUS_AREAS FA
WHERE
FA.FOCUS_AREA_ID = PFA.FOCUS_AREA_ID(+)
AND :P151_PROGRAM_ID = PFA.VS_PROGRAM_ID(+)**Deleted**
Edited by: user4498053 on Dec 27, 2011 11:24 AM -
Bapi for updation of table VBRP
Hi,
I have to Update the Field 'KONDM' in the table VBRP. Is there some BAPI available for updating VBRP or we can have to go with the direct Update to the table. I have to Update this field by a stand alone report program.
Thanks and regards,
Pankaj Bist.Might be use this Function module
CALL FUNCTION 'RV_INVOICE_ITEM_MAINTAIN'
EXPORTING
VBRP_I = VBRP
IMPORTING
VBRP_E = VBRP
TABLES
XKOMFK = XKOMFK
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBSS = XVBSS
XVBRK = XVBRK
XVBRP = XVBRP
XVBPA = XVBPA
XKOMV = XKOMV.
Matintain the value in the VBRP table & pass rest as is... u get the value using the FM RV_INVOICE_DOCUMENT_READ -
Updating multiple tables from updatable report
Hi, I'm new to APEX and SQL and need some help
I've got 2 tables, one for person (containing employee_id which is the primary key and position_id, which shows the position that the employee fills, and some others) and one for position (containing position_id as primary key and current_inc, which shows which employee is currently in that position, and various others). All variables are varchar2.
Now I've made an updatable report for the person table that can add and update the table without problems using a multi row update, but I also want if to update the value of current_inc in the position table if I were to assign a position to a certain employee in the person table.
I've though of using either a trigger or a procedure to do it but havn't been able to find satisfying examples online.
Any suggestions on how to do it (please include sql code)
Thanks
VInstead of trigger on view... Create a view with the tables you want updated, then build and instead of trigger on the view to handle the updates between tables See this blog entry for an example: http://dgielis.blogspot.com/2006/09/updateable-view.html
Thank you,
Tony Miller
Webster, TX
Maybe you are looking for
-
Want to procure material with reference to WBS and sales order
Dear all If i have assigned account assignment in PO means then while GR my material value is going to consumption. I dont want to book consumption at GR level i want to do consumption at delivery level. Also i want to procure material for particular
-
I can't activate my iTunes voucher
hi,can't activate my iTunes £50 voucher
-
In regards to transfers...
My MacBook is a few weeks old and my boyfriend has been sending me all his music through ichat to boost my itunes. It's been going great for weeks, but today every time he tries to send a folder it says the following- Your buddy cannot receive transf
-
Error invoking target install make file
Hi all i am installing 9i on linux platform the install is succesfull while linkin am getting the following error can anybody help me out "Error in invoking target install of makefile $ORACLE_HOME/plsql/lib/ins_plsql "
-
Lenovo Yoga 2 11 shuts down unexpectedly
I'm a little frustrated with Lenovo products lately! I recently had an issue with the battery not keeping charge/not reporting the right percentage/instant charge drops/etc. so I sent it out to have it repaired. Recieved it back this morning and no