Sql server ecord上次更新了吗?然后只需筛选LastUpdated>={startOfThisMonth}和LastUpdated
ecord上次更新了吗?然后只需筛选LastUpdated>={startOfThisMonth}和LastUpdated<{startOfNextMonth}的位置?这样您就可以轻松检索新的或更改的记录。Sql server ecord上次更新了吗?然后只需筛选LastUpdated>={startOfThisMonth}和LastUpdated,sql-server,coldfusion,compare,Sql Server,Coldfusion,Compare,ecord上次更新了吗?然后只需筛选LastUpdated>={startOfThisMonth}和LastUpdated
<cfquery name="getNewPHys" datasource="#dsn#">
SELECT *
FROM sourceTable
WHERE physID NOT IN
(SELECT physID FROM logtable
WHERE daterange between #somerange# AND #someotherrange#)
</cfquery>
ControlYearMonth = "201410"; // October 2014
<cfquery>
select field1, field2, etc
from yourtable
where YearMonth = <cfqueryparam value="#ControlYearMonth#">
except
select field1, field2, etc
from yourtable
where YearMonth < <cfqueryparam value="#ControlYearMonth#">
<cfquery>