if suppose i have 3 columns namely 1,2,3 in table a and
1,2,3 in table b Now in table a 1,2 and table b 1,2 columns
are having same data.now based on this two columns either
data should get inserted or updated. How do i write a sql
query to check whether the data is populated correctly or
not

Answer Posted / misra

Select a.*,b.*,'update' as type
from a,b where a.1=b.1 and a.2=b.2
union
Select a.*,b.*,'insert' as type
from a,b where a.1<>b.1 or a.2<>b.2

Basically its like scd1,with table A as source and table B as target.
Based on "type" column you can write insert/update statement in stored procedure at db level or keep update strategy in informatica level.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi all , I am planning for informatica S - PowerCenter 8 Mapping Design certification. I have rewuired the dumps for the same. if anyone of you having the same pl. share it with me. This will be of great help. My contact is : sagardev7@gmail.com TIA , Sagar

2269


What is target load order?

802


What is substr in informatica?

659


What is a joiner transformation?

545


What is informatica?

675






How do you remove duplicate records in informatica? And how many ways are there to do it?

703


Whats the difference between informatica powercenter server, repositoryserver and repository?

667


Explain what transformation and how many are there in informatica?

480


What is meant by incremental aggregation?

577


Explain the features of connected and unconnected lookup.

535


What are the main features of Oracle 8i with context to datawarehouse?

1673


Enlist the tasks for which source qualifier transformation is used.

582


How to extract sap data using informatica?

601


can you please explain me pre session and post session options?

6357


How many input parameters can exist in an unconnected lookup?

984