my table(table1)
in database
Column | Type | Modifiers
--------+---------+-----------
date1 | date | not null
line_1 | numeric | default 0
line_2 | numeric | default 0
line_3 | numeric | default 0
line_4 | numeric | default 0
line_5 | numeric | default 0
R console
> line1 <- 32+45
> line1
[1] 77
I want export these value (line1 = 77) into the table (table1) in line_1 column and date1 column should fill with present date minus 1 day.
I tried with the below command for updating line1 value, but i am getting an error
s <- dbGetQuery(con, "insert into table1 (line_1) values (line1)")
Error in postgresqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not Retrieve the result : ERROR: column "line1" does not exist LINE 1: insert into table1 (line_1) values (line1) ^ ) Warning message: In postgresqlQuickSQL(conn, statement, ...) : Could not create executeinsert into table1 (line_1) values (line1 )