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 add a new records into source?
my soure table is emp having columns sal,deptno in the deptno 10,20,30deptno row are there expected out put is min(sal) of 10th deptno,max(sal) of 20th deptno,mean(sal) of 30th deptno using aggregation stage
What is the Difference Between DataStage 7.5 version and 8.1 Version?
Explain ibm infosphere information server and highlight its main features?
what is a force compile
What is the differentiate between data file and descriptor file?
on how many columns we can perform aggregation in the aggregator stage?
What are iconv and oconv?
What is exact difference between Parallel Jobs and server Jobs..
j1,j2,j3 jobs r runing iwant to run j1,j3 after j2 how to do this using sequencer? 2)j1,j2,j3 jobs r runing iwant to run j1,j2,j3 how to do this?
Differentiate between hash file and sequential file?
Can anybody tell me in detail any complex datastage job? I have worked only in direct load and full refresh jobs.But in all interviews this question arises