"P" is not "p"
try sqlSave(myconn,P,tablename="trial",rownames=FALSE) Have a wonderful day! - Albert ________________________________ From: R-help <r-help-boun...@r-project.org> on behalf of Ramesh YAPALPARVI <ramesh.yapalpa...@icloud.com> Sent: Wednesday, January 24, 2018 4:00:39 PM To: R-help@r-project.org Subject: [R] Help with SQLsave Hi all, I'm using RODBC library to connect to a database. I'm trying to read a table from a database and after manipulating it would like to write to the same database but with a different table P<-data.frame(sqlQuery(myconn,'select * from Demographics')) sqlSave(myconn,p,tablename="trial",rownames=FALSE) I'm gettng this error Version:1.0 StartHTML:0000000107 EndHTML:0000001014 StartFragment:0000000127 EndFragment:0000000996 Error in sqlSave(myconn, p, tablename = "trial", rownames = FALSE) : [RODBC] Failed exec in Update 22018 0 [Microsoft][ODBC Driver 11 for SQL Server]Invalid character value for cast specification Thanks, Ramesh ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.