If seg file having 10 records
ex:eid
1
2
"
"
10
if oracle database having 100 records
ex:eid
1
2
"
"
100
how to delete matched records permenently from oracle
database using datastage ?
Answers were Sorted based on User's Feedback
we can delete in 2 ways:
1) in TGT Oracle Stage,
select 'Write Mode' as 'DELETE'
and write the delete Query as
"DELETE FROM EMP_TGT
WHERE EID IN (SELECT EID FROM EMP_SRC)"
2)Select 'Write Mode' as 'UPDATE' and write some dummy update query(This statement will not execute as WHERE condition 1=2) as
"UPDATE EMP SER EID='1111' WHERE 1=2"
then write delete query in 'Run before SQL statemets' as
"DELETE FROM EMP_TGT
WHERE EID IN (SELECT EID FROM EMP_SRC)"
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / vaibhav
We can perform inner join between seq file & oracle stage and then in target oracle stage have write method as Delete where we can specify delete query using orchestrate incoming rows..
Is This Answer Correct ? | 3 Yes | 0 No |
Simple job:
SEQ>>>ORACLE_STAGE.
in ORCL_STAGE: SPECIFY WRITE METHOD: DELETE ROWS
specify the matching column as key column in column definition.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / shilpasagarg
1)The approach is to load the seq file data into one
temporary table say EMP_TEMP. (SEQ -> ODBC Stage (Oracle
(EMP_TEMP table)
EMP_TEMP contains
eid
1
2
"
"
10
2)Then take the ODBC Stage to connect to Oracle DB (EMP
table).
EMP table contains
eid
1
2
"
"
100
Here use the below query to delete the matched EID's
permanantly from oracle DB
DELETE EMP
FROM EMP
INNER JOIN EMP_TEMP
ON EMP.EID=EMP_TEMP.EID
Is This Answer Correct ? | 0 Yes | 3 No |
How to implement complex jobs in data stage?
hi this is kiran i have one table i want divide the table with two different table like even rows and odd rows how can i do this one tell me plzz
what are the types of nodes
table actions available in oracle connector?
what is the differeces between hash and modulus partition methods
i want anser this question empno,ename,sal 12,mmm_ww,200 13,nnn_xx,300 14,bbb_qq,400 which stages are take which types of logicks are doing pls help me
what is the difference between 7.1,7.5.2,8.1 versions in datastage?
in aggregator , how can i get the sum in readable format
i have 3 diffrent tables. 1) US rate data 2)CANADA rate data and 3)MEXICO rate data. All 3 tables have 6 collumns each. 4 collumns are commun to all tables and 2 are diffrent. Now at target i want single table say Country rate which will have (4+2+2+2+1 flag) 11 collumns. I will add a flag collumn which will indicate country and will put nullable collumns which are not common to other. How i can implement this in datastage?
how do u convert date in 20-12-07 to dec-20-2007 or 20-dec- 2007 or 20-dec-07 in parallel
deptno wise to find max and min,and sum of rows and in target to company wise maximum
What are some different alternative commands associated with "dsjob"?