I'm sorry I don't quite understand your response. I just want to check if a specific record already exists. If it does I want to update it, if it doesn't I want to insert it, and I can't use MERGE because the server is running SQL 2000.
Well that bit suggests otherwise - so this is definitely 2000?
Another informal term for this is UPSERT.
--Insert rows that don't already exist
INSERT INTO destination_table (column1, column2)
WHERE NOT EXISTS (
WHERE column1 = '[value1]' --Note we removed column2 from the WHERE clause since for
--this example we assume here that column1 uniquely identifies the row
--If this function returns 0 then no rows were inserted, which mean they already exist, which means we need to update.
IF @@ROWCOUNT = 0
SET column2 = '[value2]'
WHERE column1 = '[value1]'--We assume here that column1 uniquely identifies the row