Article View: borland.public.vdbase.data.sql
Article #116Re: Dates me to
From: Steve Koterski
Date: Mon, 18 Jan 1999 00:00
Date: Mon, 18 Jan 1999 00:00
37 lines
2006 bytes
2006 bytes
On Fri, 15 Jan 1999 21:24:03 -0700, "John Williamson"
<datam@mail.hubwest.com> wrote:
>have simple select but did not pay attention when there was talk about this
>dates. Here is my line that I have trouble with, it does not like the word
>date
>select * from rppt where date >= mfdate and date <= mtdate
>date is a field in rppt
>mfdate and mtdate are public variables
>I could use a simple filter but would like to take a stab at this sql stuff
The word "DATE" is a keyword in SQL and your use of it conflicts with that.
If you cannot change the name of the column in the table (best choice),
there is a way to use the column with its existing name (second best
choice).
Simply enclose the column name in quotation marks and prefix that with the
name of the table or a table correlation name. Any one of the three
statements below are acceptable.
SELECT *
FROM rppt R
where (R."date" BETWEEN mfdate AND mtdate)
SELECT *
FROM rppt
where (rppt."date" BETWEEN mfdate AND mtdate)
SELECT *
FROM "rppt.dbf"
where ("rppt.dbf"."date" BETWEEN mfdate AND mtdate)
//////////////////////////////////////////////////////////////////////////
Steve Koterski "I do most of my writing sitting down.
Technical Publications That's where I shine."
INPRISE Corporation -- Robert Benchley (1889-1945)
http://www.inprise.com/delphi
Technical Details
Message-ID:
<36a66cad.2669260@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<77p454$4l01@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,2e2d582e6be9dacb X-Google-Attributes: gidff5a1,public From: skoterski@NOSPAMinprise.com (Steve Koterski) Subject: Re: Dates me to Date: 1999/01/18 Message-ID: <36a66cad.2669260@forums.inprise.com> X-Deja-AN: 434058500 Content-Transfer-Encoding: 7bit References: <77p454$4l01@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