[英]Data is not being copied into the temp table in SQL Server while joining with another table un
select L.*
into PortTom4L
from PortTomMsgHist4L L
Inner join PortTomMsgHist P on P.mnmNestOrderNumber = L.mnmNestOrderNumber
where P.DtTime >= convert(datetime, '2020/01/01', 103)
and P.DtTime < convert(datetime, '2020/02/01', 103);
Format 103 is DD/MM/YYYY.格式 103 是 DD/MM/YYYY。 Just use a regular date format:只需使用常规日期格式:
select L.*
into PortTom4L
from PortTomMsgHist4L L join
PortTomMsgHist P
on P.mnmNestOrderNumber = L.mnmNestOrderNumber
where P.DtTime >= '2020-01-01' and
P.DtTime < '2020-02-01';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.