Dear R-help readers, i've created a database for quotes data (for 4 years; 2007 -- 2010) with the sqldf package. This database contains a column "Date" in the format mm/dd/yyyy. The table in the database is called "main.data" and the database itself "Honda". I tried to get the Data just for certain period, say from 01/01/2007 until 01/10/2007 with the following code: sqldf("select * from main.data where Date<='01/10/2007' and Date>='01/01/2007'), dbname="Honda") I get the data for this period for every year(2007,2008,2009,2010) not only for 2007. It seems that the year is "overlooked" and just looked for the fitting days and months. Because I haven't really much experience with sql I decide to send my problem to the list. Many thanks in advance.
Dear R-help readers, i've created a database for quotes data (for 4 years; 2007 -- 2010) with the sqldf package. This database contains a column "Date" in the format mm/dd/yyyy. The table in the database is called "main.data" and the database itself "Honda". I tried to get the Data just for certain period, say from 01/01/2007 until 01/10/2007 with the following code: sqldf("select * from main.data where Date<='01/10/2007' and Date>='01/01/2007'), dbname="Honda") I get the data for this period for every year(2007,2008,2009,2010) not only for 2007. It seems that the year is "overlooked" and just looked for the fitting days and months. Because I haven't really much experience with sql I decide to send my problem to the list. Many thanks in advance.