🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Date - SQL

#1194
From: Steve Koterski
Date: Sat, 04 Apr 1998 00:00
32 lines
1654 bytes
On Sat, 04 Apr 1998 11:49:26 +0800, EDDIE SHUM <econshum@netvigator.com>
wrote:

[...]

>1. What is wrong with my following SQL statement:
>
>	SELECT DATE_I_REC FROM PAYMENT_FORM WHERE DATE_I_REC > {15/02/98}
>
>	DATE_I_REC is a date field containing information on dates when
>invoices are received and PAYMENT_FORM is my file.   I have tried other
>combinations but nothing works.

[...]

In local SQL (what the BDE uses for dBASE and Paradox tables), DATE
literals in SQL statements must be in the format MM/DD/YY or MM/DD/YYYY.
Further, to prevent the literal from being mistaken for an arithmetic
calculation, the literal must be enclosed in quotation marks. The curly
braces you use are a dBASE convention, and not usable by the local SQL
parser.

  SELECT DATE_I_REC
  FROM PAYMENT_FORM
  WHERE (DATE_I_REC > "02/15/98")

**************************************************************************
Steve Koterski
Borland International, Inc.
http://www.borland.com/delphi
(Remove the "SPICEDHAM2" from the address. Death to spam-bots!)
Technical Details
Message-ID: <3527a053.14862085@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3525ADC6.529F@netvigator.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,f86e0e72f9edadfc
X-Google-Attributes: gidff5a1,public
From: koterski@SPICEDHAM2borland.com (Steve Koterski)
Subject: Re: Date - SQL
Date: 1998/04/04
Message-ID: <3527a053.14862085@forums.borland.com>
X-Deja-AN: 340906286
Content-Transfer-Encoding: 7bit
References: <3525ADC6.529F@netvigator.com>
Mime-Version: 1.0
Reply-To: koterski@SPICEDHAM2borland.com
Content-Type: text/plain; charset=us-ascii
Organization: Borland International, Technical Publications
Newsgroups: borland.public.vdbase.data.sql