Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bizzare Behaviour in Remote View setting
Message
 
To
27/09/2006 07:08:38
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01157425
Message ID:
01157441
Views:
14
>SQL Server = mySQL 5.0
>VFP 9.0a
>
>appt_time = datetime
>appt_duration = tinyInt

Try:
SELECT Appt_table.id, Appt_table.case_no, Appt_table.appt_time,;
       Appt_table.appt_duration, Appt_table.cliniccode, Appt_table.remark,;
       DATEADD(ss, Appt_table.appt_duration*60, Appt_table.appt_time) as end_time;
 FROM appt_table Appt_table;
 WHERE  Appt_table.appt_time BETWEEN ?weekday1 AND ?weekday2;
 ORDER BY Appt_table.appt_time, Appt_table.cliniccode
I suppose that you trying to ADD Appt_table.appt_duration minutes to your DateTime, if so, you cuold do that directly:
<pre>
SELECT Appt_table.id, Appt_table.case_no, Appt_table.appt_time,;
       Appt_table.appt_duration, Appt_table.cliniccode, Appt_table.remark,;
       DATEADD(mi, Appt_table.appt_duration, Appt_table.appt_time) as end_time;
 FROM appt_table Appt_table;
 WHERE  Appt_table.appt_time BETWEEN ?weekday1 AND ?weekday2;
 ORDER BY Appt_table.appt_time, Appt_table.cliniccode
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform