in reply to Re: Replace data in the column of one file with corresponding ones in another file
in thread Replace data in the column of one file with corresponding ones in another file

thanks for the help; what did you mean by unique key? It is an ID for each row and corresponds with the first file. Could you also explain how your script works?
  • Comment on Re^2: Replace data in the column of one file with corresponding ones in another file

Replies are listed 'Best First'.
Re^3: Replace data in the column of one file with corresponding ones in another file
by remiah (Hermit) on Jan 28, 2011 at 06:35 UTC

    I mean unique constraint of database, which the field should never have duplicate data. Text file doesn't have such a constraint, sometimes we see duplicate ID in text file. So I think the first thing is to check whether file2 has duplicate ID or not.

    SNP_A-4293670 ss75925050 rs999999 SNP_A-4293670 ss75925050 xxxxxxxx
    This is duplicate ID sample. If file2 has duplicate ID like 'SNP_A-4293670', the result would be overwritten by ' xxxxxxxx'.