🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #149

Re: Date field in sql builder

#149
From: Steve Koterski
Date: Thu, 04 Mar 1999 00:00
29 lines
1950 bytes
On Thu, 04 Mar 1999 00:33:57 GMT, supportInfo@borland.com (Ken Mayer
[TeamB]) wrote:

>"Herman Viaene" <herman.viaene@online.be> wrote:
>
>>Writing something simple like the following does not work in VdB 7.01 SQL
>>Designer:
>>select * from invoice where order_date > {01/01/1995}
>>results in message "Error in criteria row: invalid use of keyword". Field is
>>formatted correctly and century is on, what is wrong then.
>
>Bowen's got the right of it, but just to explain a bit more, local SQL
>doesn't understand dBASE expressions, dBASE literals like the date you
>show above, etc. Local SQL sees dates as character strings, instead
>..

And, to take Ken's expansion of Bowen's answer just one step further...

Since the original poster is in Belgium, I would remindhim that local SQL
is not localized. The date portion of DATE and TIMESTAMP literals must be
in the US format, with month before date.

This does not apply to DATE and TIMESTAMP values passed as parameters.

//////////////////////////////////////////////////////////////////////////
Steve Koterski                    "My problem lies in reconciling my gross
Technical Publications            habits with my net income."
INPRISE Corporation                             -- Errol Flynn (1909-1959)
http://www.borland.com/delphi
Technical Details
Message-ID: <36e4e115.7047839@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7bk1bs$2i77@forums.borland.com> <36ddce30.1329713@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,9c0ce2ccf9b5c6e5
X-Google-Attributes: gidff5a1,public
From: skoterski@NOSPAMinprise.com (Steve Koterski)
Subject: Re: Date field in sql builder
Date: 1999/03/04
Message-ID: <36e4e115.7047839@forums.inprise.com>
X-Deja-AN: 450981436
Content-Transfer-Encoding: 7bit
References: <7bk1bs$2i77@forums.borland.com> <36ddce30.1329713@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: INPRISE Corporation, Technical Publications
Mime-Version: 1.0
Reply-To: skoterski@NOSPAMinprise.com
Newsgroups: borland.public.vdbase.data.sql