当我试图插入另一个表中的信息时,它应该是空的时候从date
列返回'1900-01-01'。在导入表上,数据类型为varchar
,我想在表中插入信息是date
数据类型。有在EndDate
列一些空值应插入为空,但它返回“1900-01-01”SQL Server:插入日期返回错误的值
Insert into tblServiceHistory (PersonID, PositionID, CommitteeID,StartDate, EndDate)
Select distinct
PersonID, PositionID, CommitteeID, StartDate, EndDate
From
tblCommitteeOfficers_IMPORT
Where
PersonID is not null
And StartDate is not null
And PositionID is not null
And CommitteeID is not null
你会出现在你的数据的价值'1900-01-01'。 –