"On how to solve the problem of time-triggered - experts invited" not completely solve - how to identify the record to add time?

Category: MS-SQL Server -> Applications Author: linlin1317852 Date: 2001-07-09 01:13:28
 
linlin1317852
2001-07-09 01:13:28
Problem depicts:

existing data table A (Z1, Z2, Z3), B (Z1, Z2, Z4), application functionality must be implemented on the Table A daily updates, and every day you must at a particular time, such as 9:00 clock and put in front of one day (24 hours) to add records Z1, Z2 fields into a table B in.

how to achieve?

previous question of the time-triggered problem is basically solved, but there is a problem:

how to achieve the previous day's records into a new data table it ? How to identify the record is added to the previous day? Each field in a record time to time how to deal with? If the record is not the time field how to handle it?
xiangqigaoshou135
2001-07-09 01:32:02
1. specific time to deal with, you can use the SQL operations to achieve
2. How to achieve the previous day's records into a new data table, um need in your table to add an ID field that identifies handle the situation
zhao453jun
2001-07-09 01:56:30
In fact, you still do not consider it fully?
time if the table has fields for the new record, easy to judge.

for modified records, how you going to deal with? delete it?

your data on a regular basis is to achieve to import it, or synchronous.
jackykok
2001-07-09 02:12:20
Thank you for your answer!

my current database only required to achieve regular data import capabilities.

I still have questions:

when importing data from a table to identify the records that meet specific timeframe set, and then the implementation of import, which there is a problem , is not to use a cursor mechanism? If I want to export the data sheet for the A (Z1, Z2, TIME), you need to export the fields Z1 and Z2, TIME is the time stamp, I need to import temporary table creation, suppose you want to name it TEMP1, fields of ( Z1, Z2, Z9), Z9 is additional data, to achieve this functional programming on how to achieve?

Thank you!
xiaohaoa_c
2001-07-09 02:37:41
select * into temp1 select z1, z2, z9 = 'value' from A where [time] between 'Start time' and 'End Time'