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


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?

Answers were Sorted based on User's Feedback



i have 1000 records in my dource table, the same i have in target ,but a new column added in targe..

Answer / srini

SQ>>EXP>>>TAR

Generate seq in exp and check for condition like

iif(seq<100,10,iif(seq>100 and seq<=200,20,iif(seq>200 and seq<=300,30,40)))

Is This Answer Correct ?    12 Yes 3 No

i have 1000 records in my dource table, the same i have in target ,but a new column added in targe..

Answer / rocky!!

Here is another answer.
--> SEQ1
SD --> SQ --> EXP --> EXP --> TGT
--> SEQ2

1) Add SEQ1. Keep Starting value as 1 with cycle attribute set in after end value 100.
2) Add Another SEQ2. This is to keep a tab on the record count on the incoming data flow.
3) Get NEXTVAL & NEXTVAL1 from SEQ1 and SEQ2 and dump it in EXP.
4) in EXP, add Varibale port "V_OUTPUT_DECISION" and write code "CEIL(NEXTVAL1/100)"
5) in EXP, add variable "V_BATCH_NO" and initialise value as 10.
6) in EXP, add output port "OUTPUT_DECISION_BATCH_NO" and write code as "V_OUTPUT_DECISION*V_BATCH_NO"
7) connect fields viz, YEAR, DESC, MONTH, SALARY and BATCHNO to Target.

I guess this is the generic code. Bring any number records, should work.

Cheers!!

Is This Answer Correct ?    3 Yes 0 No

i have 1000 records in my dource table, the same i have in target ,but a new column added in targe..

Answer / santosh

Please follow the below step.

1.Create sequence geneteor which will start with 1.
2.Connect the nextval port to expression t/p.
3.connect port from sq transformation to expression t/p.
4.Create below port in the expression transformation.
a. NEXTVAL_OUT(Variable port)= NEXTVAL-1
b.rec_con(Variable port)= IIF(NEXTVAL_OUT % 100 = 0, REC_CON+10,REC_CON)
c. REC_CON_OUT(Out put port)= rec_con

5. If you have primary key on the target table then use update startegy t/r to update the targer.
6. If you don't have primary key on the target table then use update voerride in the properties tab of the target.
7. U can use the below query to update the target by update override.
UPDATE EMP_UPDATE SET REC_COUNT = :TU.REC_COUNT WHERE EMPID = :TU.EMPID

Please correct me if anything wrong.

Thanks and Regards
Santosh Kumar Sarangi

Is This Answer Correct ?    1 Yes 1 No

i have 1000 records in my dource table, the same i have in target ,but a new column added in targe..

Answer / srikanth

target update over ride..

Is This Answer Correct ?    0 Yes 1 No

i have 1000 records in my dource table, the same i have in target ,but a new column added in targe..

Answer / nitin

Source->SQ->Sequence->Exp->Target

In Sequence Generator:
Give Start Value = 1
End value = 100
Check the Properties as CYCLE.

Give the following condition In Expression Transformation:\
O_SEQUENCE= NEXT_VAL
COUNT = IIF(O_SEQUENCE > 1 AND O_SEQUENCE <= 100, COUNT+10)

Make the default value of COUNT as 0

Is This Answer Correct ?    1 Yes 6 No

i have 1000 records in my dource table, the same i have in target ,but a new column added in targe..

Answer / rajkumar

it's just like a simple pass.But we have to use an
expresion in between source and target we have to continue
the loop of variable port has to continue for every 100
records.

Is This Answer Correct ?    1 Yes 7 No

Post New Answer

More Informatica Interview Questions

why union is active transformation?

4 Answers   IBM,


What is the difference Between Mapping parameter and variable

3 Answers   Accenture,


What are the advantages of informatica?

0 Answers  


how to create a sample mapping for dynamic lookup transformation

2 Answers  


Differentiate between sessions and batches?

0 Answers  


Which will beter perform IIf or decode?

3 Answers   TCS,


Design a mapping to load a target table with the following values from the above source?

0 Answers   Informatica,


On a day, I load 10 rows in my target and on next day if I get 10 more rows to be added to my target out of which 5 are updated rows how can I send them to target? How can I insert and update the record?

6 Answers  


Explain what are the different types of transformation available in informatica.

0 Answers  


I have 1 crore record in my table and I have to load 25 L in 1st target,25L in 2nd target and 25L in 3rd target? I am new to Informatica,can anybody suggest me the idea?

2 Answers  


my source having the records like ram 3 sam 5 tom 8 and i want to load into target like ram record 3 times,sam record 5 times, tom record 8 times

3 Answers   Satyam,


Hi all, iam new to informatica, can anyone tell me what is unit testing & how it is done? thank u

3 Answers  


Categories