|
@@ -406,7 +406,7 @@ if __name__ == "__main__" :
|
|
|
##########################################################
|
|
|
## 예보데이터 확인 후 임시데이터라면 데이터 삭제 후 삽입
|
|
|
# MSSQL Access
|
|
|
- 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)
|
|
|
# Create Cursor from Connection
|
|
|
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")
|