I have to use some hardcode data in sql script, for this I am using temp table
x
CREATE TABLE #Temp
(
[Type] INT,
StartDate DATETIME,
EndDate DATETIME,
InterestRate DOUBLE
);
INSERT INTO #Temp
VALUES (1, '2015-07-01', '2017-05-01', 27),
(1, '2017-05-02', '2017-06-30', 25.71)
On line 6, it is showing error as Expecting Id
Is there any simplest way to do this?
Advertisement
Answer
There is no double
data type in sql server
use decimal
.
CREATE TABLE #Temp
(
[Type] Int,
StartDate DateTime,
EndDate DateTime,
InterestRate decimal
);
Insert Into #Temp Values
(1,'2015-07-01','2017-05-01',27),
(1,'2017-05-02','2017-06-30',25.71)