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 2000 Forums
 SQL Server Development (2000)
 If trigger would help?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-10-14 : 08:34:08
ashish bayas writes "Hello :

Am new to SQL Server need some advice on how to proceed.

I am working with MS SQL 2K.
I have a TABLE X which gets updated every minute i.e all the records are overwritten every one minute.
I need to create a new table TABLE Y and should copy all transcation from TABLE X at an interval of every hour.
I need to do this for three different time intervals i.e (7.00 AM to 3.00 PM) (3:01 to 11:30 PM) and (11:31 PM to 6:59 AM).

Can you suggest me a good method for implementing this?

Thanks
ASB"

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-10-14 : 09:05:15
Good heavens! What kind of table requires all its records to be overwritten every minute?! Why dont you simply use a plain text file? I bet it'll be a lot faster. I guess the data is coming in from a CSV or another text format anyway, so why not leave it as is?

For the regular copying, look up "Jobs" and "SQL Server Agent" in the Books Online.

Owais


Make it idiot proof and someone will make a better idiot
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-14 : 12:55:14
This sounds like a design problem. Can the design be changed? A trigger would be able to do this for you, but that doesn't mean that it should be implemented.


Tara
Go to Top of Page
   

- Advertisement -