realbasic-nug
[Top] [All Lists]

Re: REALSQL Date fields

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: REALSQL Date fields
From: Frank Bitterlich <bitterlich2@gsco.de>
Date: Wed, 29 Apr 2009 10:48:58 +0200
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <4a533bec0904231917y2743b647o59196e2fb6a2aa9e@mail.gmail.com>
References: <C06B41C7-9E84-4E0D-B845-3BC78DC525A6@gsco.de> <4a533bec0904231917y2743b647o59196e2fb6a2aa9e@mail.gmail.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
The more I look into this, the more trouble I can see ahead.

The problem with the "equals" operator can be worked around by using a range instead, but it's gonna be interesting to see how I can use the GROUP BY clause with such fields, or have correct multi-field ORDER-BY clauses where the first sorted column is a DATE type column.

Sigh... what I really love about standards like SQL is that there are so many ways to <del>bend</del>interpret them :)

Cheers,
   Frank+++



Am 24.04.2009 um 04:17 schrieb Carlos M:

On Fri, Apr 17, 2009 at 4:48 PM, Frank Bitterlich wrote:
Hi,

I'm not often using the built-in REALSQL database (we use FrontBase here at
the office), so I might be just doing something wrong...

I have trouble selecting rows by a date field when use the "=" comparison. I have a daatabase table that has a column of type "Date", and all records have a non-NULL date in there. I can find what I need if I use "less than" or "greater than" comparisons, but all "equals" queries containing something
like "... where MYDATEFIELD='2009-01-01' ..." turn up zero rows.

What if you use "...MYDATEFIELD = '2009-01-01 00:00:00'..." (with time
set to zeros)?

...


--

Günter Schmidt GmbH
Frank Bitterlich             eMail: bitterlich@gsco.de
Ben-Gurion-Ring 21           WWW:   http://www.gsco.de/
D-60437 Frankfurt            Tel.:  069 / 156809-29
GERMANY                      Fax:   069 / 156809-28
Geschäftsführer: Jürgen Hartwich
AG Frankfurt am Main, HRB 76504 - USt.-ID: DE235219624






_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>