Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 synchronization of SQL tables

Author  Topic 

mshsilver
Posting Yak Master

112 Posts

Posted - 2009-04-03 : 08:33:14
Hi,

Every night i have a table populated with data by an external source. I then need to push this data in to two other tables before deleting the data that the external source sends over.

I have searched high and low and can't find the best solution for this. I am happy write code but it has to happen in the early hours of the morning and can't require anyone clicking a button, it needs to be automated.

Is this possible? Any help would be great. Thanks

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-04-03 : 08:41:52
So create a job, that runs every x minutes between the hours the table is populated to check whether it has been populated, if it hasn't, do nothing, if it has, call a procedure which runs the inserts you require and truncates the original table.
Go to Top of Page

mshsilver
Posting Yak Master

112 Posts

Posted - 2009-04-03 : 09:10:56
Thanks, that was what i need the wording for what it was i was looking for . Never heard of a SQL job before. Problem now is, Jobs are not where microsoft say it is in SQL Management Studio Express. Any ideas?
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-04-03 : 09:14:43
Under SQL Server Agent.
Go to Top of Page

mshsilver
Posting Yak Master

112 Posts

Posted - 2009-04-03 : 09:28:42
Thanks Rick, that service was not running so couldn't see it. If you have any nice tips or useful links for mirroring SQL 2005 to SQL Express i'd appreciate advice on that too.

Thanks again
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-04-03 : 10:49:51
Use replication:

http://technet.microsoft.com/en-us/library/ms165700(SQL.90).aspx

Also, if you need to schedule jobs in SQl Express, this is a great article:

http://www.sqlteam.com/article/scheduling-jobs-in-sql-server-express
Go to Top of Page
   

- Advertisement -