Click here to Skip to main content
15,905,148 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to check data in the text file and check whether that record is present in Database or not.

if(No)

I want to update database with new records(remove redundant) and no primary constraint in database.


Can any one give me suggestion.


Thanks
Posted
Updated 4-Jun-14 18:56pm
v2
Comments
Nirav Prabtani 4-Jun-14 7:31am    
in which column you want to remove Redundant data??
Karthik Achari 4-Jun-14 7:34am    
I want to eliminate data row wise

1 solution

Load the file into your application - you do not say what it is
Parse the data into a collection - you do not say what format the data is
Create a connection to the database - you do not say what your database is
Use either a stored procedure or text sql query to look for the existence of a matching record
Insert the record if there is no match
repeat for each item in the collection.
 
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