search for: samp_dat

Displaying 1 result from an estimated 1 matches for "samp_dat".

Did you mean: sampdat
2012 Mar 21
1
Using extract function for dates in sqldf
I'm trying to use sqldf to query for the earliest date of a blood test when patients have had multiple tests in a given year. My query looks like this: test11 <- sqldf("select CHILD_ID, min(SAMP_DATE) from lab group by CHILD_ID having extract (year from SAMP_DATE) = 2011") SAMP_DATE has class "date." I get the error message Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: near &qu...