Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing Hours
Message
From
04/03/2019 09:27:50
 
 
To
02/03/2019 04:11:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 10
Network:
Windows Server 2008 R2
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01666883
Message ID:
01666956
Views:
50
>Sir while using SQLSERVER 2012, I have these codes
>
>
>
>SELECT hrs,Max(reading)as reading
>FROM   bin1
>WHERE (CONVERT(VARCHAR(10), date, 103) = CONVERT(VARCHAR(10), GETDATE(), 103))
> AND (hrs IS NOT NULL) and updown=0 and tik is null
>group by hrs
>union
>SELECT hrs,max(reading)as reading
>FROM   bin1_empty
>WHERE (CONVERT(VARCHAR(10), date, 103) = CONVERT(VARCHAR(10), GETDATE(), 103))
> AND (hrs IS NOT NULL)
>group by hrs
>order by hrs
>
>
>It display following result
>
>
>But I want to get this result
>
>
>Hours from 0 to 23
>Missed hours must have value 0
>
>Please


I wrote about this problem here: http://www.tomorrowssolutionsllc.com/Articles/Including%20missing%20data.pdf

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform