Hi i have 15 columns in data frame (daily values) which i have written in SQL table from R. Now i want to append and update it every time i run analysis on new data. e.g i have table with information till march 2021 now at the end of April i want to update the same table with April values. Column numbers are same.
I am using the following code however it doesnt append when i run the analysis with new data.
Any clue ?
#write to SQL
#connection <- odbcDriverConnect('driver={SQL Server};server=server\\SQLEXPRESS,1433;database=xxx;uid=xxx;pwd=xxx')
data <-data.frame(df,check.names = F)
sqlSave(connection,data,tablename= "abc",rownames=F,append=T)
odbcClose(connection)