Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with DATETIME field in index
Message
De
09/01/2000 21:50:12
 
 
À
09/01/2000 21:09:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00315277
Message ID:
00315329
Vues:
27
>Norm, I have seen problems very much like this. In my case other formulations would work such as:
>
>count for schlhist.datetime >= workdate -1 and schlhist.datetime <= workdate + 1
>
>or something like that.
>
>I fixed my problems by reappending all of the records in the table to an empty structure.
>
>Peter Robinson

Your count sample did the trick. I also changed my query from
    select comm_log.datetime, comm_log.type, count(*) as cnt ;
	from comm_log ;
	where comm_log.datetime >= workdate ;
	group by comm_log.datetime, comm_log.type ;
	order by comm_log.datetime desc ;
	into cursor workdata

to the following

    select comm_log.datetime, ttoc(comm_log.datetime)as datekey, comm_log.type, count(*) as cnt ;
	from comm_log ;
	where comm_log.datetime >= workdate ;
	group by 2, comm_log.type ;
	order by comm_log.datetime desc ;
	into cursor workdata
and now it is working correctly also. I always use SET NEAR ON and SET EXECT OFF so I don't know why
this has bit me in the rear now. Thanks all for your help!
____________________________________________

Norm Peterson

It's a dog eat dog world out there,
and I'm wear'n milk bone underware!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform