Количество таблиц равно количеству заданий?
Hi there, We have a database which consists of 12 tables. I want to create a SQL Job to copy the table data from one database to another (same server) hourly in a set schedule time. Data will be updated every hour at source database and that fresh data should be copied to my destination database time to time. So, in my Job step, I wrote a below query, delete from <destination_table> go insert into <destination_table> select * from [SourceDatabase].dbo.<Source_table> go And this query is working fine for 1 job and 1 table. If I want to pass all 12 tables in the same job rather than creating 12 jobs for 12 tables, which query helps so that copying fresh data should be done by a single query for all 12 tables? or shall we create 12 steps for 12 tables in that job? Please suggest. Thanks,
Что я уже пробовал:
Удалить из & lt;destination_table>
идти
вставить в & lt;destination_table>
выберите * из [SourceDatabase]. dbo. & lt;source_table>
идти
ПРИВЕДЕННЫЙ ВЫШЕ ЗАПРОС К 1 ТАБЛИЦЕ
Maciej Los
Зачем вам нужна эта функциональность? Это звучит очень иррационально.