🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.forms
Article #350

Re: SQL selecting on date

#350
From: Romain Strieff [TeamB]
Date: Tue, 16 Feb 1999 00:00
26 lines
1162 bytes
In article <36C94775.33317295@skynet.be>, Luc Geers politely paraphrased 
...
> I am trying to put on a form an sql object that select the sales of the
> current day.
> It don't works with:
> 
>    this.sales = new query()
>    this.sales.parent = this
>    with (this.sales)
>       left = 2
>       top = 15.5
>       sql = "select * from sales where date=" + dtoc(date())
>       active = true
>    endwith
> 
> Is there anyone who can tell me what's wrong?
> 
DATE is a reserved SQL word, you shouldn't use it as a fieldname to avoid 
such problems.

-- 
Romain Strieff [TeamB]
Please read this newsgroup guide below before 
posting on the private Inprise newsgroups.
http://www.inprise.com/newsgroups/guide.html
--
Technical Details
Message-ID: <MPG.113371ac3e80c1d3989deb@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36C94775.33317295@skynet.be>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 15bdfb,5ea149ed5131c381
X-Google-Attributes: gid15bdfb,public
From: teamb@opto-pps.com (Romain Strieff [TeamB])
Subject: Re: SQL selecting on date
Date: 1999/02/16
Message-ID: <MPG.113371ac3e80c1d3989deb@forums.inprise.com>
X-Deja-AN: 444901436
References: <36C94775.33317295@skynet.be>
Organization: TeamB
Newsgroups: borland.public.vdbase.forms