Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wrong Calculation
Message
From
02/04/2019 09:02:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/04/2019 07:56:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01667823
Message ID:
01667827
Views:
69
This message has been marked as the solution to the initial question of the thread.
Likes (1)
It is SQL server's handling of divisions of integers (integer / integer yields an integer - IOW 50135/17808 = 2 not 2.82). For a workaround you can do this:
SELECT top(1) cast( cast(reading as decimal)/datediff(second,emp_start,emp_end)*3600 as int) as y from bin1_final 
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform