|
@@ -406,7 +406,7 @@ if __name__ == "__main__" :
|
|
|
|
|
|
|
|
|
|
|
|
- conn = pymssql.connect(host = targetDBIP_, user = targetDBUserID_, password = targetDBUserPW_, database = targetDBName_, autocommit=True)
|
|
|
+ conn = pymssql.connect(host = targetDBIP, user = targetDBUserID, password = targetDBUserPW, database = targetDBName, autocommit=True)
|
|
|
|
|
|
cursor = conn.cursor()
|
|
|
cursor.execute("DELETE " + targetDBName + ".dbo.BemsMonitoringPointWeatherForecasted where SiteId = 1 and BaseDateTime ='" +(now - timedelta(days=2)).strftime('%Y-%m-%d 01:00:00') + "' and ForecastedDateTime >= '" + (now - timedelta(days=1)).strftime('%Y-%m-%d 00:00:00') + "' order by CreatedDateTime desc")
|