🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: BETWEEN and DATE filter

#1281
From: Andrea Starz
Date: Fri, 13 Feb 1998 00:00
41 lines
1713 bytes
Ken Mayer wrote:
> 
> Andrea Starz wrote:
> >
> > Ken Mayer wrote:
> > >
> > > Andrea Starz wrote:
> > > > N.B.: Date are in format dd/mm/yy, is important?
> > >
> > > Yes. Try MM/DD/YYYY to be sure ... (although MM/DD/YY should work).
> 
> > Ok modified, not work and same error.
> >
> 
> My fault -- I didn't read the SQL as thoroughly as I ought -- dates must
> be strings -- change the {} to '' (single quotes ... or double if you
> are using single quotes for the whole string).
> 
> --
> Ken[1]@Borland
> <Please follow-up to newsgroup; do not reply to email>

Ok it works ! But.....
another problem: i have a date setting to dd/mm/yy and not mm/dd/yy and
this is a problem to remember in query designer.

Note: if I substitute a date expression in BETWEEN with two variables of
data type dd/mm/yy it works correctly. Why?
Ex.:
d1={01/12/97}
d2={31/12/97}
SELECT OL_AGG, COUNT(  DISTINCT COM_AGG )
 FROM "C:\APPL\ACOL\aggiorna.dbf" Aggiorna
 WHERE (DATA_AGG  BETWEEN  :d1  AND :d2)
 GROUP BY OL_AGG
 ORDER BY OL_AGG

Thanks

Andrea
Technical Details
Message-ID: <34E40F33.6B82@mbox.vol.it>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34E18B86.6F7A@mbox.vol.it> <34e5ee29.8053776@forums.borland.com> <34E31E68.C15@mbox.vol.it> <34E3247B.3FCE@borland.com> <34E328FF.28E6@mbox.vol.it> <34E33769.7850@borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,4441f152cccd222a
X-Google-Attributes: gidff5a1,public
From: Andrea Starz <starzand@mbox.vol.it>
Subject: Re: BETWEEN and DATE filter
Date: 1998/02/13
Message-ID: <34E40F33.6B82@mbox.vol.it>
X-Deja-AN: 324705280
Content-Transfer-Encoding: 7bit
References: <34E18B86.6F7A@mbox.vol.it> <34e5ee29.8053776@forums.borland.com> <34E31E68.C15@mbox.vol.it> <34E3247B.3FCE@borland.com> <34E328FF.28E6@mbox.vol.it> <34E33769.7850@borland.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: None
Newsgroups: borland.public.vdbase.data.sql