Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Checking For Duplicates

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-22 : 20:26:39
Gavin Mannion writes "Good Morning,

I have a C++ Application that executes a SQL statement passed to it by a script.

This application collects data from 3rd party places and populates my SQL 7 Datbase with service pack 2 on my Windows 2000 Advanced Server.

This applications runs 5 times a day and a lot of the time it returns information I allready have what I would like to do instead of inserting this data into the site I would like SQL to check if this data allready exists by a certain field name and if that field name does exist either delete the previous entry or update the previous entry with the new data.

My database is set up as follows

ID (serial)
Title (varchar "Field to Check for duplicates")
Story (text "Field to be deleted and updated")

My knowledge of SQL is not the best but I thought this might be possible by using triggers. The application does not have the capability for doing this and neither do the scripts that I write.

Is this possible? If it is then how would I go about doing this?

Thank You,
Gavin Mannion"
   

- Advertisement -