• Phil Parkin (11/25/2012)


    rhythm.varshney (11/25/2012)


    Phil Parkin (11/25/2012)


    So what is your question?

    I need to import the data into the table.The logic is If Type is MSAD then it should update MSAD column of table with userid and if type is PCG then it should update PCG column also there should not be duplicate entry for a uername i.e. for RamKumar ther should be only one entry. with both MSAD and PCG column values.

    I am not seeing a UserId column.

    Also, all you have done is stated your requirements. From these, you are assuming that I can guess what your question is, but I can't.

    UserId column is in CSV file not in SQL table.

    So if you see the first record(username is RamKumar) from CSV should insert userid value in MSAD column of table while 5th record with same username should update the same record with userid from CSV in PCG column of table