Displaying 3 results from an estimated 3 matches for "start_dt".
2012 Feb 15
1
Passing date as parameter while retrieving data from database using dbGetQuery
Hi All,
This might be simple question, I need to retrive data for modelling from the
databases. Eveytime date values changes so I countnot fix date value in the
code, it is required to pass as parameter.
When I pass the date as parameter, it throws error.
(ERROR: column "start_dt" does not exist Position: 285)
My script is as below, please guide me where am I going wrong?
All parameters are passed correctly, when start_dt and end_dt are replaced
by '2010-11-01' and '2011-01-31' respectively in the query code works fine
without any errors.
############...
2007 Dec 22
3
collection_select validation problem
I''m trying to assign a parent foreign key value using
collection_select from my child "new" form. The problem I''m having is
if I do not make a selection, I get the following error instead of the
Rails validates_presence_of error:
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occurred while evaluating
2009 Jun 30
1
How to wrap my (working) code in a loop or function? (loop/function newbie alert)
...the list elements; then I would like to rbind the
extracted rows into a new dataframe containing all of the extracted rows
from all of the list elements.
I don't need any help with the code itself, it works fine for one chunk of
data (e.g., a single dataframe). The code is:
t0<-match(times$START_DT, data$DATETIME) #MAKE A VECTOR OF START TIMES
t1<-match(times$STOP_DT, data$DATETIME) #MAKE A VECTOR OF STOP TIMES
indices<-mapply(FUN = ":", t0, t1) #MAKES A LIST, EACH ELEMENT CONTAINS
INDICES OF TIMES CORRESPONDING TO ONE WETLAND
idex<-times[rep(1:nrow(times), sapply(indices,...