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

What is a surrogate key?

555


What is the commit type if you have a transaction control transformation in the mapping?

648


Explain sessions. Explain how batches are used to combine executions?

585


How to elaborate tracing level?

681


What is workflow monitor?

589






Explain what are the different types of transformation available in informatica. And what are the mostly used ones among them?

603


What are roles and groups and benefits of using them?

569


How to create different types of slowly changing dimensions (SCD) in informatica using the mapping wizard?

621


How many types of sessions are there in informatica.please explain them?

674


What is sq transformation?

656


How to use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

687


What is meant by active and passive transformation?

582


What are the different components of powercenter?

578


If i have source as flat file. how can i store the header and trilor into one target and data into one more target. |------>target1(header+trailor) source------ |------>target2(data) can any one please help me

1547


What are the components of the workflow manager?

635