input like
2 7 8
9 5 1
7 3 6

output:2 5 6 how to find out this plz explain?

Answers were Sorted based on User's Feedback



input like 2 7 8 9 5 1 7 3 6 output:2 5 6 how to find out this plz explain?..

Answer / deepanshu

supposing single column is there having values
278
951
736

sol'n :
Use transformer string function with @inrownum variable.

inputcolumn[@inrownum,1]
will give you desired o/p

Is This Answer Correct ?    0 Yes 0 No

input like 2 7 8 9 5 1 7 3 6 output:2 5 6 how to find out this plz explain?..

Answer / bhavani

we can acheive this using transformer stage:
1. Check the record count using AGGREGTOR stage and have a column count
2. In the transformer initiate a loop with condition @ITERATION <=count. and loopvar = @iteration
3.if @INROWNUM = loopvar then right(left(@iteration),1) --> output value

Now the result will be 2
5
6

Let me know if this is correct.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Data Stage Interview Questions

Source have 1000 records and it can have three nodes ok but i want how many records are executed on each node?

3 Answers   TCS,


Difference between IBM DATA STAGE8.5 and DATA STAGE9.1 ?

0 Answers   ABC, TCS,


What is the differentiate between data file and descriptor file?

0 Answers  


How to read the length of word in unix?

0 Answers   CTS,


1.When did 8.1 parallel came into existence? 2.What is the difference between 7.5 and 8.1?

2 Answers   Mind Tree,






Hi, what is use of Macros,functions and Routines..? At what situation you are used. If you know the answer please explain it. Thanks.

0 Answers  


how to configure databases through datastage

2 Answers  


i want anser this question empno,ename,sal 12,mmm_ww,200 13,nnn_xx,300 14,bbb_qq,400 which stages are take which types of logicks are doing pls help me i don't need "_"ex nnnxx this type i want

3 Answers  


what is data mapping

2 Answers  


Why we use parameters instead of hard code in datastage.

2 Answers   IBM,


How to delete the data in dataset?types of deleting the data in dataset?

4 Answers   HSBC,


what is repositery?

0 Answers   IBM,


Categories