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 |
hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2, 10, 4.5 1, 30, 5 3, 10, 6 3, 20, 4 1, 20, 9 then target should be in below form... empno,max(salary),min(salary),deptno 1, 9, 3.5, 20 2, 8, 4.5, 20 3, 6, 4, 10 can anyone give data flow in data stage for the above scenario.... thanks in advance...
1)What is ur project architecture ? 2)how to move project from developement to uat? 3)What is the difference between datastage 6,7.1 and datasttage 7.5? 4).How to do error handling in datastage? 5)3.Whta is unit testing, system testing and integration testing? 6)What is the Exact difference between BASIC Transformer and NORMAL Transformer?When we will go for BASIC Or NORMAL Transformer 7)why we use third party tools in datastage? 8)What is the purpose of Debugging stages? In real time Where we will use?
6 Answers CTS, HCL, IBM, Wipro,
count number of deptno in a emp table?
What are the environmental settings for data stage,while working on parellel jobs?
if 3 table having different columes. like first table having 4 columns , second table having 3 columns and third table having 2 columns then how to capture the data by using funnel stage in parallel jobs...srinu.thadi
17 Answers IBM, TCS,
How to get max salary of an organization using data stage stages........... can any body help me plz.......
disign the complex job in u r project?(they are aksing only complex job design and then data flow...)
What are the different options associated with dsjob command?
How can you find out whether datastage process is running or not in unix?
what is a message handler
Describe stream connector?
Tell me the syntax of Configuration file?