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...


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

What are datastage sequences?

0 Answers  


How can remove duplicates in a file using UNIX?

3 Answers   Cap Gemini,


You enter values in a schema file for RCP and you also entered values in sequential file? which one will it take?

1 Answers   TIAA CREF,


it is possible to load two tables data into one sequential file?if possible how?plz share with me?

6 Answers   TCS,


create a job to get the previous row salary for the current row.if there is no previous row exists for the current row,then the previous row salary should be displayed as null? empid   salary   previoussalary 10      1000     null 20      2000     1000 30      3000     2000       40      4000     3000

5 Answers   Genpact,


How to initialize environment variables?

4 Answers   Infosys,


at source level i have 40 columns,i want only 20 cols at target what r the various ways to get it

5 Answers   IBM,


How to remove blank spaces from data?

3 Answers  


How to lode data in sequntional files perform faster?

1 Answers   Polaris,


Demonstrate experience in maintaining quality process standards?

0 Answers   iGate,


Can you explain repository tables in datastage?

0 Answers  


what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs?

9 Answers   HCL,


Categories