When I try to execute this query
INSERT INTO StateRegion
( FullName ,
Abbreviation ,
RegionType ,
Admitted ,
Capital
)
VALUES ( 'Alabama' ,
'AL' ,
1 ,
'1819-Dec-14' ,
'Montgomery'
);
it gives me error sql date conversion error :
Conversion failed when converting date and/or time from character string
Admitted is a Date type.
The issue is I can not change this format : 1819-Dec-14, is it possible to add convert method to the query above ?
Table definition :
CREATE TABLE StateRegion
(
ID bigint PRIMARY KEY IDENTITY(1,1),
FullName varchar(50) NOT NULL,
Abbreviation varchar(2) NOT NULL,
RegionType smallint NOT NULL,
Admitted date NULL,
Capital varchar(50) NULL
);
set language english?Dec?