Viewing 15 posts - 1,981 through 1,995 (of 4,085 total)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 23, 2017 at 10:58 am
Reported as spam.
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 23, 2017 at 8:50 am
I think that we need a better data set if we're going to give a good answer. Your current data set only has one record that will be deleted. We...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 20, 2017 at 8:31 am
Assuming that you data does not contain any records for the current month, this should work.
;
WITH CTE AS
(
SELECT StoreId, sales, DENSE_RANK() OVER(ORDER BY...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 2:32 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 1:57 pm
When working with dates, you DO NOT want to use Year and Month (unless you have a calendar table). You want to use the first day of the month. Using Year/Month...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 1:09 pm
When responding to a long post, I sometimes like to interleave my answers in the places that I'm responding to. I used to be able to just add a closing...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 12:55 pm
Reported as spam.
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 12:48 pm
jcelko212 32090 - Thursday, January 19, 2017 12:05 PMYour "TB_" is a design flaw called a Tibble
[/quote]
No, this is not...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 12:38 pm
I'm getting the same error.
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 10:07 am
Also, it's pointless to have both a DISTINCT keyword and a GROUP BY in the same section of a query. The GROUP BY has an implicit DISTINCT in it, and...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 9:59 am
I'm producing a server status...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 9:51 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 19, 2017 at 9:11 am
A common approach is to reference a calendar table, especially if you need to exclude holidays as well as weekends. You just count the number of days that qualify. J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 18, 2017 at 3:28 pm
Just use the TOP option in your DELETE statement.
DECLARE @page_size INT = 50000;
WHILE @@ROWCOUNT > 0
BEGIN
DELETE TOP (@page_size) YourTableNameHere
...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 18, 2017 at 3:17 pm
Viewing 15 posts - 1,981 through 1,995 (of 4,085 total)