I'm using union all on two data sources so that record from data source is arranged sequentially (one after the other,based on the sort condition).How to create a flag 'Y' if the records from each datasource have the same value.for instance:
source Outlet price1 price2
DDD 08536148 350 260
CVS 08852148 350 260
DDD 08536148 1000 400
CVS 08852148 350 260
for the first two records we need to set flag to Y as they are the same.