Viewing 15 posts - 2,296 through 2,310 (of 4,087 total)
Usually when people need information associated with a last instance of something, the correct method is to use a CTE that includes ROW_NUMBER with the proper partition and order and...
October 5, 2016 at 11:10 am
Thom A (10/5/2016)
DECLARE @StartDate DATE = '01-Jan-2016',
...
October 5, 2016 at 10:50 am
Thom A (10/5/2016)
DECLARE @StartDate DATE = '01-Jan-2016',
...
October 5, 2016 at 10:15 am
Why are some people with partial months included and others excluded? Is there a minimum number of days required to be counted? Or are you only counting people who...
October 5, 2016 at 10:11 am
You do realize that this thread is so old that the original article was likely written for SQL 2005, which is now deprecated. None of the scripts mention which...
October 5, 2016 at 8:59 am
A CASE statement cannot return a Boolean value. You can however return a bit or string that represents a Boolean value and test whether it returns a token that...
October 4, 2016 at 3:49 pm
SvetNas (10/4/2016)
October 4, 2016 at 3:42 pm
I think the main issue is a confusion between logical query processing and physical query processing. The physical query processing does not need to match the logical query processing...
October 4, 2016 at 3:38 pm
ScottPletcher (10/4/2016)
October 4, 2016 at 2:33 pm
What datatype are your monthbegindate and monthenddate in that they need to be converted to VARCHAR before being converted to DATETIME?
Why are you converting monthbegindate and monthenddate to DATETIME rather...
October 4, 2016 at 1:50 pm
You have to be careful with sp_MSforeachdb, because it will also run in the system databases. I assume that you don't really want to create these tables in master,...
October 4, 2016 at 1:38 pm
Eric M Russell (10/4/2016)
October 4, 2016 at 12:15 pm
Unfortunately distinct counts is one of the properties that is not associative, so you need to do all levels of the calculation at the same time. When creating your...
October 4, 2016 at 10:03 am
When directing answers to another forum, it really helps to post a link to that other forum.
http://www.sqlservercentral.com/Forums/Topic1823226-150-1.aspx
Drew
October 4, 2016 at 9:45 am
You don't say what you want to do when you have multiple entries for a single user in any one of the tables. The solution provided will give you...
October 4, 2016 at 9:43 am
Viewing 15 posts - 2,296 through 2,310 (of 4,087 total)