Re: [sqlite] Tackling the Date Scan SQL

2009-10-15 Thread Pavel Ivanov
> Why do you expect 1988-01-04 et al to be excluded? These dates meet your > condition of falling between 09/01 and 04/01 - they should appear _somewhere_ > in the resultset. I second that. Your question in the first place says about order of records, but if you indeed for some reason want to

Re: [sqlite] Tackling the Date Scan SQL

2009-10-14 Thread Rick Ratchford
[sqlite] Tackling the Date Scan SQL #> #>Try to change this: #> #>> "ORDER BY Year, ((Month - " & lngStartMth & ")*100 + (Day - " & #>lngStartDay #>> & ") + 1300) % 1300" #> #>to this: #> #>> "ORDER BY Year

Re: [sqlite] Tackling the Date Scan SQL

2009-10-14 Thread Pavel Ivanov
Try to change this: > "ORDER BY Year, ((Month - " & lngStartMth & ")*100 + (Day - " & lngStartDay > & ") + 1300) % 1300" to this: > "ORDER BY Year, Month, Day" Pavel On Wed, Oct 14, 2009 at 8:08 PM, Rick Ratchford wrote: > With Igor's help, I have this SQL

[sqlite] Tackling the Date Scan SQL

2009-10-14 Thread Rick Ratchford
With Igor's help, I have this SQL statement that pulls out records based on a start and stop date. "SELECT Year, Month, Day, Open, High, Low, Close FROM [" & gsTableName & "] " & _ "WHERE ((Month - " & lngStartMth & ")*100 + (Day - " & lngStartDay & ") + 1300) % 1300 <= ((" & _ lngEndMth -