• Phil Parkin (11/25/2012)


    rhythm.varshney (11/25/2012)


    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.

    Ahh, I see - I saw 'User' and 'Id' separated by a space and assumed they were separate columns.

    Yes so I need first row of CSV should insert into table and the value for MSAD column will get the value of UserId of CSV and when again the 5th row will have same username it should update the same record of table by updating PCG column with userid of CSV.