Subject Re: Using Field Named DATE in Where clause
From Craig <craig.s@silicon-online.co.za>
Date Wed, 14 Feb 2024 07:08:57 -0500
Newsgroups dbase.getting-started

In terms of the fieldName being a reserved word. I am trying to get new reports done in the current version of dBase as the original database is from a very early version which only works on Windows XP so the choice was not mine.

Here is the Where clause that I am trying to use:
where DATE>"(currentDate()-30)" order by DUEDATE, CUSTOMER

This is what I saw online when I tried to look up how to do it


Maurizio S. Wrote:

> reserved word for fieldName is not exactly a good idea...
> anycase, post here 'where' clause you're using
>
> maybe could use parametrized query, so date range is assigned to
> parameter and not in sql clause
>
>
>
> tks
> Maurizio
>
> Il 14/02/24 10:27, Craig ha scritto:
> > I have a database for our orders where each order has the sales person name entered in as to show whose customer it is. using the Where clause I can sort the orders so that only a specific sales person orders show up.
> >
> > However I am trying to use the Where clause to only give out the orders from a specified numbers of days ago. The field name that I am working with is when the order was entered and is labeled as DATE. This seems to be giving issues also I can't seem to get the where function to filter using any of the date fields that I have in the table.
> >
> > I am not sure if I am setting up the clause wrong or how to filter using dates in the where clause.