I have the following table in SQL Server 2014:
effDate DATETIME(23) NOT NULL
rateType CHAR(2) NOT NULL
rate DECIMAL(10, 8) NOT NULL
When I run the following query, I get an error message:
Select Failed: 8114 Error converting data type varchar to numeric.
My query:
insert into hprs.dbo.OHPRSrates
values ('01/01/2019', 'D', 0.02642000)
Why? The only numeric column in this row is rate and the insert value is clearly numeric
DATETIME(23)datatype?? Is it just a silly typo and you really meanDATETIME2(3)?? Also: when using dates in string literal form, I'd always recommend to use the ISO-8601 formatYYYYMMDD(no dashes or anything) to be independent of any language & regional settings in your SQL Server