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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / sri

Write Tablename.columnname in SQL query. In your case,

for selecting all data from table a column 2,the query is:

select * from a.2

So in this way operation of data can be made by using
required SQL operators.

Is This Answer Correct ?    3 Yes 10 No

Post New Answer

More Informatica Interview Questions

We can't use sql override or other properties when using Flat file as source. Then what is the use of Source Qualifier transformation?

3 Answers  


define galaxy repository in informatica

0 Answers  


How to use procedural logic inside infromatica?

0 Answers  


hi all, Can anyone please tell me the relationship between informatica and business objects

1 Answers  


How do you set a varible in incremental aggregation

0 Answers  


How to convert multiple rows to single row (multiple columns) in informatica

0 Answers   Informatica,


How to join three sources using joiner? Explain though mapping flow.

0 Answers  


In informatics server which files are created during the session rums?

0 Answers  


what is pre and post sql and what is diff between source presql and target pre sql

1 Answers   HCL, IBM,


How might you approve all mappings in the archive all the while?

0 Answers  


how to sort date field in infomatica?

2 Answers  


What are the issues that you have faced while moving your project from the Test Environment to the Production Environment? Please explain in depth thanks in advance

3 Answers  


Categories