Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Update or Add Record with VB

Status
Not open for further replies.

LCD

MIS
Feb 19, 2001
72
0
0
US
I need to write something that will check to see if a records UniqueID allready exsists and update that record or add it as a new record. The source table is a CSV that is generated daily with a complete list of records. And they need to be updated in the SQL DB.

What I'm looking for is a recomendation as to the best direction to go about this. I was thinking of looking to writing a procedure that does all the work on the SQL side. The only other method I can think of is having two connections to the SQL DB, one to read the row and see if it's there and the other connection to update it or add it if it doesn't exsist.

I'm still a bit new to writing apps for SQL and I just want to make sure that I do this the best way possible.

Thank you for reading, and any assistance.
 
sorry - should mention that the UniqueID is numbers and letters. I have no control over this since I do not create the source CSV.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top