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


if a column contains data like
ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to
place names separated by commas in another columns how can
we do?

Answers were Sorted based on User's Feedback



if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / pranay

seq file ------> Transformer -------> target

1.extract the source data into seq file.
2.In transformer source column to target , and apply the field function
Field(column name, ',' , 1)
next same drag the source column to target , and apply the field function
Field(column name,',',2)
.
.
.
Field(column name,',',5)

Is This Answer Correct ?    8 Yes 0 No

if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / vaibhav

Use Pivot Stage.

Is This Answer Correct ?    0 Yes 0 No

if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / shar

Well the Question is not clear at the moment.
if ur question is
1)single col with single row like
name
ram,rakesh,madhan,suraj,pradeep,bhaskar
then
ur requirement of asking is again this?
like
ram,rakesh,madhan,suraj,pradeep,bhaskar
or
2)single col with multiple rows like
ram
rakesh
madhan
suraj
pradeep
bhaskar
and u want o/p like ram,rakesh,madhan,suraj,pradeep,bhaskar.
Then praney anwer doesn't suite to get output.
neither u can use pivot stage using vertical pivoting bec
what will u pivot and group by.... not possible.
Finally one way is:

Use SeqStg-->ColGen-->Tx-->RemDup-->Dataset.
At colgen give a new column and assign 1 to all rows and
send the result to tx.
At tx take three variables and expressions to concatenate
the input with the help of colgen new column.
Hint: If sv1 <> sv3 Then DSLink45.cname Else sv2 : ',' :
At RemDup specify Last value
And finally u will the output.

Still if u dont get what i explained just mail me
shharrath@yahoo.com

Is This Answer Correct ?    0 Yes 0 No

if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / santhu

Then We have to concatenate by using concatenation operation with comma(,)in transformer

Is This Answer Correct ?    1 Yes 2 No

if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names..

Answer / abhishek

No Need of fileds and all extraact al the columns in
transfarmerstage create a new column in transe as exprestion
col1,col2,col3 and load it

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Data Stage Interview Questions

how to abort the job its matain duplicates?

0 Answers   TCS,


What are the types of hashed files in data stage

0 Answers  


What is the difference between account and directory options ?

0 Answers  


what is 'reconsideration error' and how can i respond to this error and how to debug this

0 Answers   Wipro,


How many input links can you give to a Transformer stage?

6 Answers  


Hi friends, I am new to datastage, i have one query in datastage any one you please give reply to my post. I have a workbook (excel sheet) named as eg: xxxx, in that i have two tables emp(eid, ename, salary, deptno) and dep(deptno, name, state). in my source i have ODBC enterprise stage read the emp table and dept table join the two table and write the dept no 10(eid,ename,salary,name,state) values in target(). Thanks, Badari

0 Answers  


on how many columns we can perform aggregation in the aggregator stage?

2 Answers   Reliance,


What is the difference between the local container and shared container?

0 Answers  


i have a scenario in which i/p columns areID,salary with 1,1000 2,2000 and 3,3000 i need an extra column in the o/p named avg(salary)how can i get it?

4 Answers   L&T,


1.What is the flow of Transformer? 2.How can you do INDEX table in DataStage level?

0 Answers   EDS,


Difference between server jobs & parallel jobs?

0 Answers  


What is the importance of the exception activity in datastage?

0 Answers  


Categories