Search
 
SCRIPT & CODE EXAMPLE
 

SQL

SQL create table full of dates

CREATE TABLE _Dates (
  d DATE,
  PRIMARY KEY (d)
)
DECLARE @dIncr DATE = '2000-01-01'
DECLARE @dEnd DATE = '2100-01-01'

WHILE ( @dIncr < @dEnd )
BEGIN
  INSERT INTO _Dates (d) VALUES( @dIncr )
  SELECT @dIncr = DATEADD(DAY, 1, @dIncr )
END
Comment

PREVIOUS NEXT
Code Example
Sql :: how to compile a function in oracle 
Sql :: hive batch drop table 
Sql :: sql server run procedure on all databases 
Sql :: drop check command 
Sql :: updating mysql 
Sql :: sql get latest of 2 datetimes 
Sql :: VERIFY INDEXES WITH PARTITIONS IN SQL ORACLE 
Sql :: flashback in bigquery 
Sql :: select A from B join C as D using E where F match G order by H desc 
Sql :: SQL Backup Only New Changes in SQL 
Sql :: sql case when exists in another table 
Sql :: kie business put user infos in database 
Sql :: mysql server create connection string 
Sql :: tsql rename column name 
Sql :: what is in operator 
Sql :: microsoft sql server import bak file 
Sql :: java.sql.sqlexception: access denied for user 
Sql :: sqlite describe table 
Sql :: like and not like together in sql 
Sql :: pl sql call web service 
Sql :: sql server isnull function nor working count 
Csharp :: c# delete file if exists 
Csharp :: add only bottom border to container flutter 
Csharp :: c# math to radiant 
Csharp :: How to read SQL Server COUNT from SqlDataReader 
Csharp :: save file with unique name c# 
Csharp :: using variables from other procedures C# 
Csharp :: unity 3d camera rotate up and down 
Csharp :: c# append to file 
Csharp :: c# set a guid 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =