#Import FMCG Ultra-sensitive and sensitive productsDim_username_dept <-read.table (file ="~/dm/cluster/yihaodianbao", #Header = TRUE,Sep ="\ t", #strip.white = TRUE,Stringsasfactors =FALSE) str (dim_username_dept) head (dim_username_dept) names (dim_username_dept)<-C ("user_name","Full_name","EMAIL","DEPT")## Write Databases TablesLibrary"DBI") Library ("roracle") DRV<-Dbdriver ("Oracle") Con<-Dbconnect (DRV,"Tangjingxiao1","cathy,123", dbname ="10.0.1.226:1521/edwstd01")#write back to the name of the field in the database, be sure to capitalize it, otherwise it will not be recognized in OracleNames (dim_username_dept) <-ToUpper (Names (dim_username_dept))#write back to the table name of the database, be sure to capitalizeDbwritetable (Con, ToUpper ("dim_username_dept"), dim_username_dept, row.names =FALSE) Dbcommit (con) dbdisconnect (con)
Write the document back to the database using R