Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mysql cumulative total
Message
 
 
À
18/03/2011 07:29:14
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01504071
Message ID:
01504078
Vues:
44
>Hi Sergey its mysql
>
>but between posting and your reply I realised what I had done wrong.
>
>t.pop and s2.pop aren't proper dates they are YYYYMM and that was not giving an error from datediff but was giving the wrong number
>
>Thanks
>

You need to put the dates condition outside (e.g in the outer select statement) although it may help to put condition in both statements.
Keep in mind, that this SQL is not going to perform well on big volumes of data.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform