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)
 Executing a View (based on event)

Author  Topic 

rbh123456789
Starting Member

15 Posts

Posted - 2011-11-15 : 08:18:57
*Using SQL 2005

Hey guys -

I have an SSIS package and SQL Job which work together to EXECUTE a SQL View every morning at 4:00 AM. After the view runs, the output is exported into an .MDB file.

This works very well.

However, i want to know if there is a way to have the above SQL-export-event to trigger each time a specific table (which is looped into my View) is updated.

Hopefully this makes sense; but its like i need a way to 'monitor' this one specific table for changes; then once a change is detected, the View is run, and the output is exported into the .MDB file i mentioned earlier.

I hope someone give give me some guidance.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-11-15 : 08:32:44
How often does the table get updated? You can use a trigger for this

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rbh123456789
Starting Member

15 Posts

Posted - 2011-11-15 : 08:34:33
Madhivanan - Thanks for the reply. The table is updated a few dozen times a day; by users who are inputting information into our Case Management System application.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-11-15 : 08:38:39
If the number of rows of that table is not big, you can do the export via trigger

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rbh123456789
Starting Member

15 Posts

Posted - 2011-11-15 : 09:05:59
Thanks - so your saying i can execute an SSIS package, based on a trigger that i create for a specific table inside my SQL View?
Go to Top of Page
   

- Advertisement -