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


1
2
3
*
4
5
6
*
7
8
9

how to load records between two stars(*),

Answers were Sorted based on User's Feedback



1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

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

1 2 3 * 4 5 6 * 7 8 9 how to load records between two stars(*),..

Answer / chandu

By using filter transformation we can achieve this scenario.


Filter condition :column>=4 and column name<=6

Is This Answer Correct ?    4 Yes 14 No

Post New Answer

More Informatica Interview Questions

How do you recover rows from a failed session

1 Answers  


What is joiner cache?

2 Answers   TCS,


How to handle changing source file counts in a mapping?

3 Answers   Deloitte, TCS,


how can run the wf through pmcmd commend? write script?

2 Answers   Cap Gemini,


I have id, seq_no date, bill_amt and weight 1,11,'01-Jan-2014',100,2 2,12,'01-Jan-2014',40,5 3,13,'01-Jan-2014',32,5 4,14,'01-Jan-2014',98,2 5,15,'01-Jan-2014',105,3 6,16,'01-Jan-2014',11,3 1,11,'02-Jan-2014',40,2 2,12,'02-Jan-2014',100,5 3,13,'02-Jan-2014',132,5 4,14,'02-Jan-2014',198,2 5,15,'02-Jan-2014',15,3 6,16,'02-Jan-2014',16,3 Now I need output as date MXAMT_LSTWGHT MINAMT_GRTWGHT 01-Jan-2014 100 32 02-Jan-2014 198 100 Could not think of mapping to do so. Please help

1 Answers   Axtria,


what is the size of your data warehousing?

0 Answers   IBM,


What is deployment group?

0 Answers  


my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and so on but myrequirement is like this id name sal up_sal,1 aa 1000 null,2 bb 2000 1000, 3 cc 3000 2000 4 dd 4000 3000, 5 ee 5000 4000 , 6 ff 6000 50000 and so on so how can i get it plez reply for this as soon as possible , thanks in advanced

9 Answers  


Why should we use star schema in datawarehouse design?

2 Answers   Wipro,


What is target designer and target load order?

0 Answers  


i have two sources two flatfiles same structure one flatfile contain 100 million recs another flatfile contain 10 million recs i have to connect single target(performance oriented answer) what are the steps we have to do this scenario

4 Answers   Polaris,


Explain joiner transformation in informatica

0 Answers   Informatica,


Categories