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)
MCSE,MCDBA
[url]www.SQLDTS.com[/url]
I support PASS - the definitive, global community
for SQL Server professionals - [url]http://www.sqlpass.org[/url]

"Simon" <simon.zupanstud-moderna.si> wrote in message
news:3f0546b5news.s5.net...
> 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
>
>