Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to avoid repetition of data while uploading data from excel sheet to database?
If it is already present means it shoul replace it otherwise if it is not there means it should upload it.
Posted

1 solution

Here is a little algorithm for that

1. read next row from excel.
2. check if the data exist in the table already(using some unique column)
a. if yes update that row using some conditions
b. if no then insert this as new row
3. go to 1.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900