I have an excel file with date columns and am able to load the excel data to R with date format showing as POSIXct.
I am using library("RODBC") to insert records from R to SQL. Here is my code
sqlSave(dbconnection,R2,"R_Month2", append = TRUE,rownames = FALSE)
```R
when executing this code its giving error as,
Error in sqlSave(dbconnection, R2,"R_Month2", append = TRUE,, :
[RODBC] Failed exec in Update
22018 0 [Microsoft][SQL Server Native Client 11.0]Invalid character value for cast specification**
Please suggest,
Invalid character value for cast specification comes from the driver when:
1.) It detects a string -> non-string conversion (e.g. string -> time or string -> boardid or string->messageid)
2.) It detects that a character is out of the domain for the conversion (e.g. converting 'bob' to int)