declare @start datetime;
set @start = '2013/07/01';
SELECT a.XingMing,b.YiYuanMC,a.RiQi FROM data_XiBaoZLSQB as a LEFT JOIN BaseInfo_YiYuanXXB as b ON a.YiYuanMC_id=b.YiYuanBH WHERE datediff(d,@start,a.RiQi)>=0
联表查询
SQL查询及日期运算在医疗数据中的应用
SQL查询及日期运算在医疗数据中的应用
declare @start datetime;
set @start = '2013/07/01';
SELECT a.XingMing,b.YiYuanMC,a.RiQi FROM data_XiBaoZLSQB as a LEFT JOIN BaseInfo_YiYuanXXB as b ON a.YiYuanMC_id=b.YiYuanBH WHERE datediff(d,@start,a.RiQi)>=0

被折叠的 条评论
为什么被折叠?