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

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

I have a mapping loading 100 records and it failed on 20th record. how to recover it without changing anything.(in prod where we don't have any access).. (the session should should start from 21 record)

1620


How you can differentiate between connected lookup and unconnected lookup?

1056


If informatica has its scheduler why using third party scheduler?

1256


How do you load only null records into target?

1208


What are the transformations that are not supported in mapplet?

1016


Can we override a native sql query within informatica?

1031


what is index?how it can work in informatica

2034


what is unit testing?tell me proceedure

2214


What is the difference between Active and Passive transformation?

1147


Define filter transformation?

1088


What are the components of Informatica? And what is the purpose of each?

1045


What happens to map if we alter the datatypes between source and its corresponding source qualifier?

1042


What are the tasks that source qualifier perform?

1093


What are the types of schemas we have in data warehouse.

950


What is olap (on-line analytical processing?

1063