Hi guys,
please design job for this,
MY INPUT IS
COMPANY,LOCATION
IBM,CHENNAI
IBM,HYDRABAD
IBM,PUNE
IBM,BANGLOORE
TCS,CHENNAI
TCS,MUMBAI
TCS,BANGLOORE
WIPRO,HYDRABAD
WIPRO,CHENNAI
HSBC,PUNE
MY OUTPUT IS
COMPANY,LOCATION,COUNT
IBM,chennai,hydrabad,pune,banglore,4
TCS,chennai,mumbai,bangloore,3
WIPRO,hydrabad,chennai,2
HSBC,pune,1
Thanks
Answer Posted / subhash
what Ankit explained is correct. but small correction:
as per abouve explanation we get o/p location as below:
LOCATION
,chennai,hydrabad,pune,banglore
,chennai,mumbai,bangloore
,hydrabad,chennai
,pune
So, we need to do LTRIM/TRIM Function in devivation of the
column:
TRIM(temp1,',')---------->Location
then we get desired output.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you import and export the datastage jobs?
How a source file is populated?
how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.
What are the components of datastage?
Define orabulk and bcp stages?
Field,NVL,INDEX,REPLACE,TRANSLATE,COLESC
how to run a sequential file stage in parallel if the stage is used on the TARGET side
What are stage variables and constants?
How do you generate sequence number in datastage?
Where do you see different stages in the designer?
Give an idea of system variables.
Can you define merge?
Define project in datastage?
What is staging variable?
What are some different alternative commands associated with "dsjob"?