| |

VerySource

 Forgot password?
 Register
Search
View: 5286|Reply: 22

Accumulate a number every ten seconds

[Copy link]

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Denmark

Post time: 2021-3-1 11:00:01
| Show all posts |Read mode
I need to generate a record from a start time, every time an integer point (for example, 13 o'clock, 14 o'clock) is reached, and a record is generated in the table. A field in the record is a field of cumulative numbers, and L is every ten seconds. The field of the cumulative number of clocks will automatically accumulate a random number, and write the library, do not want to use the new page of the page to achieve, but run by SQL
Reply

Use magic Report

0

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2021-3-1 11:15:01
| Show all posts
Realize with job
Reply

Use magic Report

0

Threads

49

Posts

35.00

Credits

Newbie

Rank: 1

Credits
35.00

 China

Post time: 2021-3-1 11:30:01
| Show all posts
Realize with homework
Reply

Use magic Report

0

Threads

49

Posts

35.00

Credits

Newbie

Rank: 1

Credits
35.00

 China

Post time: 2021-3-1 11:45:01
| Show all posts
what

Realize with homework
Reply

Use magic Report

0

Threads

34

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2021-3-1 12:00:01
| Show all posts
Yes, the establishment of job scheduling is complete
Reply

Use magic Report

0

Threads

8

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Invalid IP Address

Post time: 2021-3-1 12:15:01
| Show all posts
You can use homework or simulation. In fact, instead of accumulating at a fixed time, you can calculate the time accumulated from the last time to the present in the next visit to determine how much to add this time, and record the accumulated time of this time to facilitate the next accumulation
Reply

Use magic Report

0

Threads

34

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2021-3-1 12:30:01
| Show all posts
Create a job for scheduling...
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2021-3-1 12:45:01
| Show all posts
job
Reply

Use magic Report

0

Threads

40

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2021-3-1 13:45:01
| Show all posts
--Basic steps to create a job through the wizard

(1) Enterprise Manager-->Management-->SQL Server Agent-->Jobs
(2) Right-click the job --> New job
(3) "General" tab
-->Enter the job name in "Name"
-->If you don't want the job to run immediately after creation, clear the "Enable" check box
   For example, if you want to test a job before running on schedule, disable the job.
-->If the job only runs on this server, click the "Target the local server" option
-->If the server is the main server and the job is running on other servers, click the "Target multiple servers" option
-->Enter the description of the job function in the "Description" box, the maximum number of characters is 512
(4) "Step" tab --> New
-->Enter the step name in "step name"
-->Select "Transact-SQL Script (TSQL)" in "Type"
-->"Database" select the database to execute the command
-->Enter the statement to be executed in "Command": For example, EXEC stored procedure name...
-->OK
(5) "Scheduling" Tab --> New Schedule
-->Enter the schedule name in "Name"
-->Select the execution method of your job in "Scheduling Type"
(If you choose "Repeat", you can click "Change" to set the way you repeat the job)

(6) Start the SQL Agent service and set it to start automatically, otherwise your job will not be executed
--Open SQL SERVER Service Manager-->Click "Start/Continue"-->The service will be started automatically when the OS is started
--Or My Computer-->Control Panel-->Administrative Tools-->Services-->Right-click SQLSERVERAGENT-->Properties-->Startup Type-->Select "Auto Start"-->OK.
Reply

Use magic Report

0

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2021-3-1 14:45:02
| Show all posts
Can only be done with homework
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list