SQL 쿼리의 인수로 날짜를 전달하는 방법 :R -이 다음 쿼리 시도
studentcal3 <- function(x,y)
{
i<- x
print(i)
j <- y
print(j)
demo1 <-sqldf("SELECT a.StudentName, (b.marks/a.marks) as difference from
(select Date, StudentName, marks from studenthistorydemo WHERE Date= i) as a
INNER JOIN (select Date, StudentName, marks from studenthistorydemo where
Date= j) as b on a.marks= i and b.marks= j WHERE a.marks = i and b.marks =
j and a.StudentName=b.StudentName")
}
을 그리고 다음 함수를 호출
studentcal3('2014-01-01','2014-01-02')
오류 : - rsqlite_send_query 오류 (CONN @ ptr, 명세서) : 해당 열 없음 :
해결 방법? P.S - 신입니다. R
bquote 함수를보세요 –