SQL SERVER 2008 data Insertion Error -
create table groovyexps_tgt (empno smallint, firstname varchar(20) not null, midinit char(1) not null, lastname varchar(15) not null, salary_int int, salary_decimal decimal, salary_numeric numeric, salary_float float(9), salary_money money, salary_smallmoney smallmoney, birthdate datetime, hiredate_datetime datetime, join_time time, jointime datetime) insert groovyexps_tgt values(000010, 'christine', 'i', 'haas', 52750, 52750.45, 52750.45000045, 52750.45454, 52750, 52750, '1980-08-22', '2014-08-22 10:00:00.000000', '16:00', '2014-08-22 10:00:00.000000')
error:
msg 241, level 16, state 1, line 1
conversion failed when converting date and/or time character string.
what should insert data table?
ms sql server supports datetime
upto 1000 miliseconds. these queries explain problem :
select cast('2014-08-22 10:00:00.000000' datetime) select cast('2014-08-22 10:00:00.000' datetime)
Comments
Post a Comment