1
2
3
*
4
5
6
*
7
8
9
how to load records between two stars(*),
Answers were Sorted based on User's Feedback
Answer / sunny
select substr(
(select substr('123*456*789', 1 ,
instr('123*456*789','*',1,2)-1) from dual)
,instr(
(select substr('123*456*789', 1 ,
instr('123*456*789','*',1,2)-1) from dual)
,'*',1)+1) from dual;
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / ankur
small change in the above post..
add an exp after source qualifier...with two more ports
v_out as variable =iif((is_number(inputport),v_out,v_out+1)
output=v_out
so output from this exp will be
1 0
2 0
3 0
* 1
4 1
5 1
6 1
* 2
7 2
8 2
8 2
now add a filter where output=1 and in_number(input)
Thanks
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / krishna
Mapping
source - SQ -> Exp T/r -> Filter -> target
Exp t/r:
create 4 variable and 3 output ports.
v_curr,v_flag,o_filter,o_flag,v_count,v_prev,0_count
v_flag = iif(v_currnt = '*' OR v_prev = '*' or flag_v=1,
1,0)
v_count = iif(v_prev='*',count+1,count)
o_filter = iif(No!= '*',1,0)
o_flag = v_flag
0_count = v_count
filter t/r:
condition: o_flag=1 AND o_filter=1 AND 0_count!=2
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / lakshmi
Use Replacechr() in Expression T/r after Source Qualifier
and replace '*' with Space
Then In Filter T/r Use Filter condition as below
iif(isspaces(field,0,1))
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / siva riddle
first of all , understand the requirement
it's.
records in between * 456 * ,
how to get this 3 records.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / guest
u can use mapping variable in exp transformation.
and do
decode(v_curr='*' or v_prev='*',setvariable($$,$$+1),$$)
and last port in exp setvariable($$,0) and accrdingly filter the non required...
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / ankur
small change in the above post..
add an exp after source qualifier...with two more ports
v_out as variable =iif((is_number(inputport),v_out,v_out+1)
output=v_out
so output from this exp will be
1 0
2 0
3 0
* 1
4 1
5 1
6 1
* 2
7 2
8 2
8 2
now add a filter where output=1
Thanks
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / ankur saini
hey guys c if this works...
add an exp after source qualifier...with two more ports
v_out as variable =iif((is_number(inputport),0,v_out+1)
output=v_out
so output from this exp will be
1 0
2 0
3 0
* 1
....
* 2
...
now add a filter where output>0
Thanks
Is This Answer Correct ? | 0 Yes | 4 No |
Answer / anas furquan
Use Filter transformation with below condition:
IIF(FIELD!='*',1,0)
Mapping:
Source-->SQ-->Filter-->Target
This works. :)
Is This Answer Correct ? | 1 Yes | 8 No |
source target --------- -------- name no sal name no sal max_sal r 10 1000 r 10 1000 3000 y 20 3000 y 20 3000 3000
What is meant by LDAP users?
How can you complete unrcoverable sessions?
Which transformation should u need while using the cobol sources as source defintions?
I have table with ID,PRD_DT,PRD_FLAG,CUST_DT,CUST_FLAG I need to get max date and its corresponding flag for both the date columns. Ex:- 1A,10/3/2015,AC,10/3/2015,XY 1A,10/4/2015,AB,10/2/2015,XZ Output needed 1A,10/4/2015,10/3/2015,XY I have 100 million + in the table so avoid self-join...
What is the term PIPELINE in informatica ?
Why is meant by direct and indirect loading options in sessions?
my source is like this id,name sal 10 abc 1000,10 pqr 2000, 10 xyz 3000 ,10 jkl 4000 and my requirement is like this 10 abc,pqr,xyz,jkl 2000 .... i have try for this by using expression transformatin its ok of the concatenation of second column but the thing is that on third column if u group by using agg t/r the last value will com i.e 4000 but i asked by a interviewer that i dont want the first or last column i want the middle column i.e 2000 .plz reply for the same
What is batch and describe about types of batches?
i have 1000 records in my dource table, the same i have in target ,but a new column added in target as "batchno", and this column adds no 10 for 1st 100 records and 20 for next 100 records and 30 next 100 records and vice versa. how to acheive this?
Can a joiner be used in a mapplet.
What is mapping debugger?