locked
CONDITIONAL SPLIT EXPRESSION? RRS feed

  • Question

  • I am pulling a list of employees from a database.

    I am using a conditional split to seperate the employees that have more than one record.

    Does anybody know what expression I can use for this?

    I am thinking something along the line of if the count of a person_number > 1 this will give me the the duplicated rows.

     

    Tuesday, October 4, 2011 3:43 AM

Answers

All replies

  • Do you want unique records as the output? you could use sort transform and remove duplicates there.
    My Blog    |      Ask Me     
    Tuesday, October 4, 2011 3:45 AM
  • Hi,

    You probably can fetch data from database by using "group by" E.g.

    SELECT person_number, count(*) as count_person_number
    FROM <<Table>>
    GROUP BY person_number
     

    and then in the conditional split transformation you can seprate records which are having count_person_number > 1 which would be duplicated records.

    If this doesnt' solve your purpose, could you please tell us your exact requirement, may be we can give better solution.

    Regards,
    Santosh


    It feels great if you give us points for helpful post. :)
    Tuesday, October 4, 2011 4:57 AM
  • you can use group by and count(*) method as Snatosh pointed

    also If you want a SSIS method, you can use Aggregate transform, and group by EmployeeID, and fetch count function. then in conditional split just check the count>1

     

    but if you want to get rid of duplicate records, there are some ways, here you can find a fair set of methods:

    http://toddmcdermid.blogspot.com/2009/01/eliminating-duplicate-primary-keys-in.html


    http://www.rad.pasfu.com
    • Proposed as answer by Eileen Zhao Friday, October 7, 2011 9:42 AM
    • Marked as answer by Eileen Zhao Monday, October 10, 2011 6:04 AM
    Tuesday, October 4, 2011 5:28 AM