I'm working on an SSIS package where I'm importing data from a CSV file into a SQL table.
The only field that I'm concern with is the Username. This Username must be unique. I don't care whether first name or last name are the same or not.
In the package, I imported the data from file into a temp SQL table. And then I used SELECT DISTINCT to pick unique Username. And then insert into the destination table.
The problem is: When I do a SELECT DISTINCT Username, Firstname and Lastname FROM tempUsers.
It returns:
- JSmith, John, Smith
- JSmith, Joe, Smart
- MBopp, Mary, Boppins
But I want it to return:
- JSmith, John, Smith
- MBopp, Mary, Boppins