Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can someone tell me why this query does not work?
Message
De
10/12/2013 14:14:07
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01589692
Message ID:
01589731
Vues:
81
Why are you using such complex expressions to get rid of the seconds part in the datetime if I understood what the intent is in that expression?

No - that is not the intention of the query. The intention is to convert a starting date (type date) and a starting time (C(5): HH:MM) to a DateTime and to convert the starting date and time plus the duration (C(5): HH:MM) into an ending DateTime

I suggest to simplify the query, e.g.
>
>TEXT TO lcSQL TEXTMERGE NOSHOW PRETEXT 15
>   SELECT * FROM (
>    SELECT DTOT(VEH.EvtDate) + HOUR(VEH.EvtTime)+3600 + MINUTE(VEH.EvtTime) * 60 AS start_time, 
>	... as end_Time
>	ST.descr AS SvcType_dsc, SVC.servref 
>    FROM funeral!ServiceVehicle VEH WITH (BUFFERING = .T.) 
>	JOIN aserdet SVC WITH (BUFFERING = .T.) ON VEH.service_id = SVC.serviceid 
>	JOIN psvctype ST ON SVC.servtype = ST.code 
>	WHERE VEH.VehCode =  '[[tcVehCode]]'  
>		AND VEH.SvcVehID # [[tiSvcVehID]]  ) X
>WHERE 
>		Start_time < {[[ttEndTime]]}  AND End_Time >={[[ttStartTime]]}
>ENDTEXT
That just may work. I will give it a try. Thanks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform