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

eno ename
1 qaz
1 wsx
1 edc
2 zxc
2 asd
3 qwe
3 wer
3 tru
4 rgj

Output:

eno ename count
1 qaz,wsx,edc 3
2 zxc,asd 2
3 qwe,wer,tru 3
4 rgj 1

I want the above output to be solved by DataStage as well and I have to write SQL query for the same output.

Answer Posted / purba

For Datastage:
I/p........sort stage(create key change column for empno.)........ transformer ( here take stage variables count=0,sv1. For sv1 give derivation as(if keychange=1 then sv1=ename else sv1=sv1:',':ename) for count derivation (if keychange=1then count=1 else count=count +1).........remove duplicate stage(retain last)......o/p(desired result)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use exception activity in Datastage?

1288


Where the datastage stored his repository?

1074


how to abort the job its matain duplicates?

2568


1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?

2262


what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

1373


how to use self join using datastage ? can u tell me using stage how can we implemnet the self join

5104


How one source columns or rows to be loaded in to two different tables?

1116


What is the use of datastage director?

1003


what is flow of project?

1980


Name the different sorting methods in datastage.

1038


Which warehouse using in your datawarehouse

2174


What is the difference between odbc and drs stage?

1077


What is the difference between Datastage 7.5 and 7.0?

1085


What are the different options associated with dsjob command?

1417


What are the main features of datastage?

1265