Code to insert data in bulk in SQL _mssql

Source: Internet
Author: User
Copy Code code as follows:

Set @MyCounter = 0/* Setting variable * *
while (@MyCounter < 2)/* Set the number of cycles *
WAITFOR DELAY ' 000:00:10 ' * Delay Time 10 sec * *
INSERT into Time_by_day
(time_id, The_date, The_year, Month_of_year, Quarter, Day_of_month)
SELECT Top 1 time_id + 1 as time_id, The_date + 1 as the_date, year (the_date + 1)
As The_year, MONTH (the_date + 1) as Month_of_year, {fn quarter (the_date + 1)
As quarter, day (the_date + 1) as Day_of_month
From Time_by_day

SET @MyCounter = @MyCounter + 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.