Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Olaf Schmidt
"Rich Shepard" schrieb im Newsbeitrag news:alpine.lnx.2.00.0908031516300.3...@salmo.appl-ecosys.com... > > It was set as String actually. > > Rick, > >That's the storage class; well, TEXT is the storage class. Yep. > > I believe this is a WRAPPER thing though.

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
#>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rich Shepard #>Sent: Monday, August 03, 2009 5:18 PM #>To: General Discussion of SQLite Database #>Subject: Re: [sqlite] Date Comparisons SQL #> #>

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rich Shepard
On Mon, 3 Aug 2009, Rick Ratchford wrote: > It was set as String actually. Rick, That's the storage class; well, TEXT is the storage class. > I believe this is a WRAPPER thing though. I'm programming in VB6 and using > Olaf's VB wrapper. Oh. I know nothing about Microsoft languages (or

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
qlite.org] On Behalf Of Rich Shepard #>Sent: Monday, August 03, 2009 3:45 PM #>To: General Discussion of SQLite Database #>Subject: Re: [sqlite] Date Comparisons SQL #> #>On Mon, 3 Aug 2009, Rick Ratchford wrote: #> #>> The native Date in a table without any additional express

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rich Shepard
On Mon, 3 Aug 2009, Rick Ratchford wrote: > The native Date in a table without any additional expressions is > '-mm-dd 00:00:00'. Rick, That's a timestamp format. Did you specify the column as date or timestamp? Rich -- Richard B. Shepard, Ph.D. | Integrity

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
abase #>Subject: Re: [sqlite] Date Comparisons SQL #> #>I think your problem is that you need to put the value in #>sDateTemp in quotes. #> #>"WHERE Date < '" & sDateTemp & "'" #> #>or "WHERE Format$(Date, "-mm-dd") <

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread David Bicking
racting the day from the month from the year, and comparing that number with the Date string. David --- On Mon, 8/3/09, Rick Ratchford <r...@amazingaccuracy.com> wrote: > From: Rick Ratchford <r...@amazingaccuracy.com> > Subject: Re: [sqlite] Date Comparisons SQL > To: "'Gene

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
-boun...@sqlite.org] On Behalf Of Rick Ratchford #>Sent: Monday, August 03, 2009 1:45 PM #>To: 'General Discussion of SQLite Database' #>Subject: Re: [sqlite] Date Comparisons SQL #> #>That's the clincer. #> #>The resulting DATE column is actually the format of the #>

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Pavel Ivanov
s-boun...@sqlite.org] On Behalf Of Igor Tandetnik > #>Sent: Monday, August 03, 2009 1:38 PM > #>To: sqlite-users@sqlite.org > #>Subject: Re: [sqlite] Date Comparisons SQL > #> > #>Rick Ratchford wrote: > #>> The Date is being stored as -mm-dd. Note the &q

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
, August 03, 2009 1:38 PM #>To: sqlite-users@sqlite.org #>Subject: Re: [sqlite] Date Comparisons SQL #> #>Rick Ratchford wrote: #>> The Date is being stored as -mm-dd. Note the "Format$(Date, #>> '-mm-dd') as Date" that assures this. #> #>The "Dat

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Igor Tandetnik
Rick Ratchford wrote: > The Date is being stored as -mm-dd. Note the "Format$(Date, > '-mm-dd') as Date" that assures this. The "Date" that appears in the WHERE clause is the value of the Date column in the table, not the value of the expression with the "Date" alias. You can't actually

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
nks. Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org #>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov #>Sent: Monday, August 03, 2009 1:25 PM #>To: General Discussion of SQLite Database #>Subject: Re: [sqlite] Date Comparisons SQL #> #&

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Pavel Ivanov
> How do you properly do a Date comparison in SELECT so that the only rows > returned are those that do not exceed the date found in my sDateTemp > variable? As a simple string comparison. You made it perfectly right except that your Date field should be stored in a format '-mm-dd' in

[sqlite] Date Comparisons SQL

2009-08-03 Thread Rick Ratchford
This works: SQLString = "SELECT Format$(Date, '-mm-dd') as Date, Year, Month, Day, Open, High, Low, Close, DayNum, 0 as IsSwingTop1, 0 as IsSwingBtm1, 0 as IsSwingTop2, 0 as IsSwingBtm2, Null as Delta1, Null as Delta2, 0 as Offset1, 0 as Offset2 FROM [" & sTable & "] GROUP BY Year, Month,