Simon this is very nearly the exact same question you asked in "DTS task"

Please do not post the same Q under different headings

See my reply to the other version of this Question


Allan Mitchell (Microsoft SQL Server MVP)
I support PASS - the definitive, global community
for SQL Server professionals - [url][/url]

"Simon" <> wrote in message
> Hi,
> I have 2 same tables. Once a day, I would like to INSERT or UPDATE second
> table with data FROM first table with stored procedure.
> Does anybody have the sintaks to do that?
> Probably something like:
> for each row in first table check if it exists in second table.
> If it exists then do update else do insert.
> Thank you for your answer,
> Simon