Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



If seg file having 10 records ex:eid 1 2 " " 10 if oracle databa..

Answer / subhash

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

If seg file having 10 records ex:eid 1 2 " " 10 if oracle databa..

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

If seg file having 10 records ex:eid 1 2 " " 10 if oracle databa..

Answer / vinod upputuri

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

If seg file having 10 records ex:eid 1 2 " " 10 if oracle databa..

Answer / shar

Vaibhav can u plz explain how an sql query is written b/t
seq file and oralce table in oracle stage delete query?

Is This Answer Correct ?    0 Yes 0 No

If seg file having 10 records ex:eid 1 2 " " 10 if oracle databa..

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

Post New Answer

More Data Stage Interview Questions

Define data aggregation?

0 Answers  


Hi, My source is oracle(eno,ename,sal,commision,...), my requirement is like this, if there is a null values in commission col i want to keep it as null,and for the remaining first two characters of the value in my target. Plz help me

1 Answers  


What are the functionalities of link partitioner and link collector?

0 Answers  


What are iconv and oconv?

0 Answers  


How can you find out whether datastage process is running or not in unix?

3 Answers   Accenture,


how to change left and right links in join stage?

4 Answers   Cap Gemini, IBM,


how to transfer file from one system to another system in unix? which cmd to be use?

5 Answers   Cap Gemini,


1.how to generate even numbers in surrogate or tranformar stage ? 2. how many ways to remove duplicate values?

5 Answers   Gallega, TCS,


what is operator combinality in datastage?

1 Answers   TCS,


what is time dimension? and how to populate time demension

2 Answers   TCS,


how to call routines in stages?

3 Answers   ME,


Please explain me the difference between 3 types of slowly changing dimension in datawarehousing?

3 Answers   TCS,


Categories