Sync SQL Server rows on schedule
Database
What it does
When a scheduled query runs in SQL Server, this automation upserts a row in the Student.Course table. The row is created if it does not exist or updated if it does, keeping the table current.
Who it's for
Data and analytics teams who need to maintain SQL Server tables on a schedule without manual updates.
Apps used
How teams use this
Keep course enrollment data current
Run the scheduled query nightly to upsert student course records in SQL Server. The table stays in sync with the source without manual intervention or duplicate rows.
Sync enrollment across databases
Extend this automation to upsert rows in a second SQL Server table by adding another upsert step that targets a different database. Both tables stay synchronized on the same schedule.
Filter rows before upserting
Add a condition to the query so only rows matching specific criteria are upserted to the Student.Course table. This keeps the table focused on relevant records.
How it works
- Run the scheduled query. A scheduled query executes in SQL Server at the configured time, retrieving new or updated rows from the Student.Course table.
- Upsert the row. The automation upserts the row in the Student.Course table in SQL Server, inserting it if it does not exist or updating it if it does.