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

What is transformation?

665


Explain the use of aggregator cache file?

682


expain about the tune parameters?

1892


Hi, There is a session in my workflow which is running for a long time, atlast we found the cause is the missing index. My session is running via a stored procedure. Can I create an Index on the table which the stored procedure is using while my session is running? Please suggest. My Informatica version is PC 8.0.6 My Oracle APPS is 11.5.3. Thanks,

6760


How to use procedural logic inside infromatica?

642






Which are the different editions of informatica powercenter that are available?

563


Differentiate between router and filter transformation?

621


How do you load first and last records into target table? How many ways are there to do it? Explain through mapping flows.

642


Is stop and abort are same in informatica?

574


permutations of mapplet

2044


How can we remove the duplicates from flat file source?

583


Can you use flat files in Mapplets.

2228


Hello , I am unable to work with SQL transformation at least. Where do i need to give connection for sql transformaton ? At session level there is no property . I have created a SQL Transformation and chosen query mode. But do i need to pass connection information to it ? I don't know where do i need to write a query ? I have written a query in file and that file path i gave in the properties of SQL Transformation. But it is not working. Could any one of you please let know how can i work with SQL Transformation? Advance Thanks.

2329


What is a dimensional model?

585


Tell me about Propagate functions in informatica

532