Subject Re: SQL stop sorting at middle of table
From Keith <drkwchan@outlook.com>
Date Sun, 06 Jan 2019 00:24:53 -0500
Newsgroups dbase.getting-started

Mervyn Bick Wrote:

> On 2019-01-05 1:49 AM, Keith wrote:
>
> > Hi Mervyn,
> > Condate is a date field and your codes work very beautifully.
> > However the Last_consult shows as 02/28/2018.
> > Please teach me how to check the contents of condate.
> > Much thanks....
> > Keith
> >
>
> You are going to need to inspect the actual records.
>
> In the Command Panel
>
> select count(*) from consults where extract(year from condate) = 2018
> list off
>
> This is just to output the count of consults for the year.
>
> select code,condate from consults where extract(year from condate) =
> 2018 order by condate
> //all that on one line
> browse
>
> If the last record on view in the browser is 02/28/2018 records for the
> rest of the year are not in the table or the values in condate have been
> corrupted.
>
> select * from consults
> browse
>
> Records for 2018 will have been added to the bottom of the table each
> time so you should see them below the entry for 02/28/2018
>
> If there are records after 02/28/2018 how to fix this depends on what's
> wrong.  Please describe what the dates look like after 02/28/2018 and we
> can start from there.
>
> Each select closes the rowset opened previously but to prevent leaving
> the last rowset open enter USE when you've finished exploring the table.
>
> Mervyn.
>
>
> Hi Mervyn,
Problem solived.  
Thanks for the guidance all along.
The problem comes from the date format I used in the codes.
If I stick to the mm/dd/yyyy format in the codes, the error is gone.
Much...much...much......appreciation.
Best regards
Keith
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>