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

Source Like
department_no, employee_name
----------------------------
20, R
10, A
10, D
20, P
10, B
10, C
20, Q
20, S

and Output should be like this

department_no, employee_list
--------------------------------
10, A
10, A,B
10, A,B,C
10, A,B,C,D
20, A,B,C,D,P
20, A,B,C,D,P,Q
20, A,B,C,D,P,Q,R
20, A,B,C,D,P,Q,R,S

Answer Posted / srinivas

By using the stage variables in transformer we can do this.

Before going to use transformer sort the data based on two columns.Order should be like below

Deptno Empname
10 A
10 B
SO ON...

After that in transformer take 3 stage varibles

stg1--->map the sorted Deptcolumn

stg2---> DSLink2.empname:',' (map the empname column and concatenate comma operator)

Stg2--->stg3:stg2 (concatenate first two staging varibles)


Then

In derivation of employee_list column (In transformer)

use below function

TRIM(stg3,',','T')---->employee_list (column derviarion)

It will gives you as expected result.

Thanks
Sri

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between datastage and datastage tx?

1057


What is datastage engine?

1172


How and where you used hash file?

1168


What are the types of jobs we have in datastage?

1071


What is process model?

1966


Name the different types of Lookups in Datastage?

1251


how to implement scd2 in datastage 7.5 with lookup stage

5601


In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?

1033


Explain ibm infosphere information server and highlight its main features?

1085


Can you explain players in datastage?

1186


How can we improve performance of data stage jobs?

1012


How to Remove Duplicate using SQL?

1360


What is ds designer?

1095


Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also

3164


1.new record it will insert but changes of natural key is not present in taget i want to update (here key is composite natural key )can any one help this to explan how to do

2080