Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mysql cumulative total
Message
 
 
To
18/03/2011 07:29:14
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01504071
Message ID:
01504078
Views:
45
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform