in datastage interview qustion
source target
------- -------
12345 1
2
3
4
5
Answers were Sorted based on User's Feedback
SRC-->TFM--->TGT
in TFM, Use Stage variables and Loop variables as below:
StageVar-->Len(Lnk.Source)===>this will give length of string of "Source" column. i.e.,
Source StageVar
12345 5
Next, in the Loop variable part:
Loop While==> @ITERATION<= StageVar
For input row, Loop will repeat until "Source" length(5) finishes.
Add new Loop variable-->LoopVar and put below derivation:
Left(Lnk.Source, @ITERATION)-->LoopVar
Next, in the Output Col Derivation:
LoopVar-->Target
Ex:
For 1st ITERATION: Left("12345", 1)==>1
For 2nd ITERATION: Left("12345", 2)==>2
....
....
Finally, you will required Output.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / lajpat kurdiya
SELECT SUBSTR(12345,LEVEL,1) AS Source
FROM DUAL
CONNECT BY LEVEL <= LENGTH(12345);
SELECT SUBSTR('12345',LEVEL,1) AS Source
FROM DUAL
CONNECT BY LEVEL <= LENGTH('12345');
Is This Answer Correct ? | 0 Yes | 0 No |
how to use self join using datastage ? can u tell me using stage how can we implemnet the self join
If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?
is it possible to access the same job by two users at a time in DataStage?
how to design the change capture stage in(data stage parallel jobs) type 2
In my project source data comes from MAINFRAME in files.so,This time data is coming as a binary file...I know for binary data we use Complex flat file stage..I have used it also..but on 'view data' data is not coming correctly..as it in MAINFRAME.give me some ideas..
How a source file is populated?
i want send my all duplicate record one tar and all uniq records one target how we will perfome explain example: input data eid 251 251 456 456 951 985 out put/target1 251 251 456 456 out put/target2 951 985 how we will bring
13 Answers Bank Of America, IBM,
it is possible to load two tables data into one sequential file?if possible how?plz share with me?
difference between function and procedure...
what is a message handler
in sequtial file 2 columns avaliable,iwant only one column load the target how do it.
Define repository tables in datastage?