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

what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs? interm of output in Merge Reject link and Look Up Reject link ?

4 Answers   HCL,


Hi Friends, I have a input data like, class_id Marks 101 50 101 60 101 40 102 90 102 35 And i want my output data like class_id Marks Rank 101 50 2 101 60 1 101 40 3 102 90 1 102 35 2 how to do this in datastage?

8 Answers   Cognizant, HCL, TIAA CREF,


Create a job to load all unique products in one table and the duplicate rows in to another table. The first table should contain the following output A D The second target should contain the following output B B B C C Q2. Create a job to load each product once into one table and the remaining products which are duplicated into another table. The first table should contain the following output A B C D The second table should contain the following output B B C

3 Answers   Deloitte, IBM,


how to get the unique records on multiple columns by using sequential file stage only

3 Answers  


project Steps,hits, Project level HArd things,Solved methods?

0 Answers   Hexaware,


What are the prerequisites for join stage

2 Answers  


Difference between the Sequence and Sequencer in DS?

1 Answers   TCS,


Define oconv () and iconv () functions in datastage?

0 Answers  


How to find value from a column in a dataset?

0 Answers   TIAA CREF,


what are the different type of errors in datastage?

2 Answers   Wipro,


How to remove duplicates in transformer stage? in parallel mode

6 Answers   Syntel, TCS,


i have a small question for datastage, After the desinging (i.e., transformations and loading)part, what we can do?

1 Answers   TCS,


Categories