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

write s sql query following table some duplicate present i
want unique one column duplicate another column display?

name id
a 1
a 1
b 2
b 2
c 3
i want the required output like
unique duplicate
name id name id
a 1 a 1
b 2 b 2
c 3

Answer Posted / chandan023

1.Sort the data 
2.Expression transformation
   a)create a variable1(integer) and var2(string)
   b) var2 = concatenate all fields
   b)  set the value of the variable to 1 if (concat all fields are = var2)
   c) create a o/p port = var2
-- output of the expression t/f will be like
   NAME ID NEW_COL
   a  1 0
   a  1 1
   b  1 0
   b  1 1
   c  1 0
 3. Use a router transformation and route the data based on the new thirt column.

Happy ETLing :)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to extract the informatica rejected data?

1162


What is workflow? What are the components of workflow manager?

1119


What are the different options available for update strategy?

938


How to call shell scripts from informatica?

935


Whats there in global repository

1642


How to load data in informatica ?

953


What does refresh system mean, and what are its distinctive choice?

1072


What is different between the data warehouse and data mart?

1001


Can any one give me a real time example for FACT TABLE & DIMENSIONAL TABLE?

2053


What is primary and backup node?

1081


Differentiate between router and filter transformation?

952


Workflow is long running due to long running sql query so when we refer the query plan it tells the issue is due to partition of the db table. How to handle this?

1603


Explain where to store informatica rejected data? How to extract the informatica rejected data?

950


How can we improve session performance in aggregator transformation?

1039


What are the features of complex mapping?

1096