Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Missing Hours
Message
De
04/03/2019 09:27:50
 
 
À
02/03/2019 04:11:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 10
Network:
Windows Server 2008 R2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01666883
Message ID:
01666956
Vues:
51
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform