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 to validate the jobs

2 Answers   IBM,


How many partitions does a node can have? Some body explain me clearly about the partitions and the nodes?

3 Answers  


I have 100 records how can I load at a time from the single time

1 Answers  


What is the difference between odbc and drs stage?

0 Answers  


hi.... am facing typical problem in every interview " I need some critical scenarios faced in real time" plz help me guys

0 Answers  






How do u view log file for a particular job?

6 Answers   HP,


Why we use surrogate key?

0 Answers  


I have a source like file it have Number of records and i want to load without first and last records in target?Datastage?

4 Answers   CSC,


which memory is used by lookup and join

5 Answers   IBM,


How many number of reject links merge stage can have?

7 Answers   TCS,


what is the difference between == and eq in UNIX shell scripting?

0 Answers   CTS,


In the source seq file have 2 columns, i.e input: col1,col2 1,1 2,rajesh 3,15000 4,2 5,suresh 6,16000 7,3 8,veeru 9,17000 I want in the output like: eno,ename,sal 1,rajesh,15000 2,suresh,16000 3,veeru,17000 any one answer this scenario

3 Answers  


Categories