Is there a merge statement in SQL Server 2000
I want to combine update and insert statement into single statement as follows.
MERGE INTO MyTable
USING MyTempTable
ON MyTempTable.MatchingField1 = MyTable.MatchingField1
WHEN MATCHED THEN
UPDATE UpdateField1 = MyTempTable.UpdateField1
WHEN NOT MATCHED THEN
INSERT VALUES(MyTempTable.MatchingField1, MyTempTable.UpdateField1)
Currently if I try to run this stmt, it gives error "Incorrect syntax near the keyword 'INTO'."
Thanks

Merge Statement
Der Sven
chaza
--
Adam Machanic
Pro SQL Server 2005, available now
http://www..apress.com/book/bookDisplay.html bID=457
--