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)
 Delete Trigger

Author  Topic 

abdu82
Starting Member

1 Post

Posted - 2010-06-19 : 05:59:53
Hi all,

This is an urgent question.

i have a table contains 'CreationDate' Column and i want to create trigger to delete any row in this table the 'CreationDate' Column is less than today date

but i want this trigger run automatically

can any one help me??

please reply me quickly

Abdullah S. Abdelhay

Kristen
Test

22859 Posts

Posted - 2010-06-19 : 06:55:32
"This is an urgent question"

Pay a consultant then ...

You need a scheduled task, not a trigger
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-06-19 : 08:41:37
Triggers don't run automatically, they run when data is changed. You want a SQL job that runs daily.

Why is this urgent on a Saturday morning?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-06-20 : 04:28:01
quote:
Originally posted by GilaMonster



Why is this urgent on a Saturday morning?

--
Gail Shaw
SQL Server MVP



Because in Saudi it is first day of a new week.


Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.

PBUH
Go to Top of Page
   

- Advertisement -