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)
 insrt rows frm 1 table to anothr based on sys time

Author  Topic 

muralidaran_r
Starting Member

13 Posts

Posted - 2007-11-29 : 02:21:39
Hi

I have two tables A, B

In table A i have a column "StartDate" with Date & Time

I want to insert rows from A to B when system time reaches A.Startdate.

How to do this?

Please provide step by step guidance.

PeterNeo
Constraint Violating Yak Guru

357 Posts

Posted - 2007-11-29 : 02:28:00

Insert into B ([ColumnsList])
Select [ColumnsList]
From A
Where StartDate = GETDATE()
Go to Top of Page

muralidaran_r
Starting Member

13 Posts

Posted - 2007-11-29 : 02:32:13
How to run this query continous to check for new records in A?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-29 : 03:24:22
quote:
Originally posted by muralidaran_r

How to run this query continous to check for new records in A?


Schedule that as a job

Madhivanan

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

- Advertisement -