create proc proc_test
as
create table #temptest
(testid int,
testnumber varchar(10),
testdate datetime)insert into #temptest(testid,testnumber,testdate)
select testid,testnumber,
case when testdate is null then ''
else
case when datediff(day,'01/01/1900',convert(varchar,testdate))>0 then testdate else null end
end as testdate
from test
select * from #temptest
as
create table #temptest
(testid int,
testnumber varchar(10),
testdate datetime)insert into #temptest(testid,testnumber,testdate)
select testid,testnumber,
case when testdate is null then ''
else
case when datediff(day,'01/01/1900',convert(varchar,testdate))>0 then testdate else null end
end as testdate
from test
select * from #temptest
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货