I have a table with exist data:
USERS
---------
id
username
lname
fname
status
Every night, I get the same data with updates or new rows added into a stage table. the stage table is refreshed nightly.
USER_STAGE
----------
id
username
lname
fname
status
What would be the best method of updating my USER table with a new "status" change or new users?
Any ideas to help me get started woudl be great? Would I want to use a stored procedure using the MERGE and options of when matched do and update and when not matched, do an insert? I didnt know if there is a quicker way?
Thanks!
JE
USERS
---------
id
username
lname
fname
status
Every night, I get the same data with updates or new rows added into a stage table. the stage table is refreshed nightly.
USER_STAGE
----------
id
username
lname
fname
status
What would be the best method of updating my USER table with a new "status" change or new users?
Any ideas to help me get started woudl be great? Would I want to use a stored procedure using the MERGE and options of when matched do and update and when not matched, do an insert? I didnt know if there is a quicker way?
Thanks!
JE