I/P

---



ID Value

1 AB
2 ABC
3 ADE
4 A

O/p
---
ID Value
1 A
1 B
2 A
2 B
2 C
3 A
3 D
3 E
4 A

Answers were Sorted based on User's Feedback



I/P --- ID Value 1 AB 2 ABC 3 ADE ..

Answer / subbuchamala

SRC-->TFM--->TGT
in TFM, Use Stage variables and Loop variables as below:

StageVar-->Len(Lnk.Value)===>this will give length of string of "Value" column. i.e.,
ID Value StageVar

1 AB 2
2 ABC 3
3 ADE 3
4 A 1

Next, in the Loop variable part:
Loop While==> @ITERATION<= StageVar
For each input row, Loop will repeat until "Value" length finishes.

Add new Loop variable-->LoopVar and put below derivation:
Left(lnkCstIPSGMSPread.IJABL, @ITERATION)-->LoopVar

Next, in the Output Col Derivation:
Lnk.ID-->ID
LoopVar-->Value

Finally, you will required Output.

Is This Answer Correct ?    4 Yes 0 No

I/P --- ID Value 1 AB 2 ABC 3 ADE ..

Answer / mohanasam

please clarify the answer? Vinod

Is This Answer Correct ?    0 Yes 1 No

I/P --- ID Value 1 AB 2 ABC 3 ADE ..

Answer / upputuri.vinod

first of all we have to split the value into individual char
value(1,1) v(2,2) v(3,3)
c1 c2 c1 c2 c3 c4
1 AB 1 A B
2 ABC---> 2 A B c----> pivot--->o/p
3 ADE 3 A D E
4 A 4 A

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More Data Stage Interview Questions

what are the devoleper roles in real time? plz tell i am new to datastage....

0 Answers   Mphasis,


Suppose take my name "Reddyvaraprasad" From source it is coming Reddy vara prasad Need to get As Reddyvara prasad/

4 Answers   TCS,


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.

0 Answers   JPMorgan Chase,


what are the different type of errors in datastage?

2 Answers   Wipro,


What is size of a transaction and an array means in a datastage?

0 Answers  






AGGREGATOR default datatype

0 Answers   CTS,


if ename='subbu' while running job the job should be abort how come?

3 Answers   IBM,


How can we read latest records in a text file named file1.txt using seq file stage only? file1 having 100 records in that 5 record sare latest records.How can we read that latest records?

3 Answers   Caterpillar,


table actions available in oracle connector?

0 Answers   CTS,


Hi All, Could you please let me know whether Datastage server and px supports oredb? OREDB:It's a Oracle Retail Embedded Database.Previousely It was called as Acumate data base. It's a multidimensional database. Please help me on this issue ASAP. Thanks in advance Ashok

1 Answers   Accenture,


Hi this madan, in data stage one file in Empno 12345678910 in a table, i want target is  Empno 1                                2 3 4 5 6 7 8 9 10                                                                                             

5 Answers   Tech Mahindra,


What is the surrogate key? what is the use of surrogate key? how to Create surrogate key Generator in scd2 in 8.5?

5 Answers   SLK Software,


Categories