i have a scenario with i/p as ID,salary with values 1,1000
2,2000 and 3,4000 i need an extra column in the o/p named
amount with values 2000,4000 and NULL. how can i get it?

Answers were Sorted based on User's Feedback



i have a scenario with i/p as ID,salary with values 1,1000 2,2000 and 3,4000 i need an extra colum..

Answer / snr

Using TRS Satge with this logic

If ID=left(salary,1) then Salary*2 else 'Null'

Is This Answer Correct ?    12 Yes 1 No

i have a scenario with i/p as ID,salary with values 1,1000 2,2000 and 3,4000 i need an extra colum..

Answer / rahul baheti

Input - Transfer - Output
In Transfer, apply the order by desc on ID and define two stage variable (SVC1, SVC2) put the if condition in stage variable against SVC1 (If SVC1 = NULL then setnull() else SVC1 = SVC2) and in SVC2, assian the sal.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Data Stage Interview Questions

How a server job can be converted to a parallel job?

0 Answers  


how to write server Routine coding?

0 Answers   Eric,


what is executable in DataStage?

2 Answers  


What is a range lookup?

2 Answers   IBM,


what is the Difference Between Datastage Server Edition and Parallel Edition?

2 Answers   Tech Mahindra,






How can one find bugs in job sequence?

0 Answers  


i have the source from Uk,north america how can i pass the data two tables based on the locations

2 Answers  


What is the diff between sort performed at sort stage and the stream sort performed at the input of few stages in DS Enterprise edition?

1 Answers  


Can you explain kafka connector?

0 Answers  


can any one tell me how to install datastage 8.1 in windows xp with wizard

2 Answers  


Is possible to create skid in dim,fact tables?

0 Answers   NTT Data,


What is the difference between the local container and shared container?

0 Answers  


Categories