Viewing 15 posts - 31 through 45 (of 47 total)
So you just have to find the top selling product by period first:
WITH topSale AS (
SELECT
SaleYear
, SaleWeek
, MAX(Quantity) [MaxQty]
FROM [dbo].[SalesData]
GROUP BY SaleYear
, SaleWeek
),
SELECT
b.ProductId
, COUNT(b.ProductId) [Top...
April 23, 2014 at 9:50 am
SELECT
[Product ID]
, COUNT(IIF([Position] = 1,1,NULL)) [Top Seller Count]
FROM
GROUP BY [Product ID]
April 23, 2014 at 8:22 am
It's not terribly difficult if you modify the default trace to capture the data you want and then setup a nightly agent job to pull the trace data you require...
April 22, 2014 at 1:58 pm
You should be able to turn off auto-growth on that file entirely after you make sure you have additional data files with available space. Then re-index with padding...
April 22, 2014 at 1:45 pm
I'm getting the same thing, both on a PC with SQL 2012, VS 2012 and VS 2010 and now on a new laptop with SQL 2012, VS 2012, and...
March 26, 2014 at 3:19 pm
An ideal situation is where you have the same amount of RAM as the data file size for the database + 2GB for the operating system/etc.
However, that is not really...
November 22, 2013 at 12:21 pm
I'm experiencing the same problem on some of my SSRS reports, and it appears to be intermittent.
We have several hundred report subscriptions, the SQL Agent Jobs report success, but I...
November 19, 2013 at 12:07 pm
That seems like what the issue is, however, there is no rebuilding index on the secondary, but it's a logged event, so, I think, rebuilds/reorgs on the primary should update...
October 21, 2013 at 2:30 pm
I prefer books because I can make notes, dog-ear pages, spill coffee on it, etc. Plus, I can still read it even when the batteries are dead, and the...
October 10, 2013 at 2:19 pm
Sounds like an SSIS job to me.
You may want to provide a little more information, such as whether or not this is a 1 time operation or a something to...
October 10, 2013 at 2:14 pm
Basu's suggestion was right.
Here is my full query to list all DDL changes:
ALTER PROCEDURE [dbo].[SchemaChangesToday]
@dbName VARCHAR(128) = NULL
AS
BEGIN
DECLARE @filename nvarchar(1000);
-- Get the name of...
October 8, 2013 at 10:11 am
There are so many variables, I don't know how you could qualify a "good" ratio of Developers to DBAs. DBA can mean a lot of different things. ...
October 4, 2013 at 4:57 pm
We currently have 4 developers and I'm the 1 DBA, which seems like a good ratio. The last company I was at had 8 DBA's and 30-40 developers.
Of course,...
October 4, 2013 at 6:55 am
I'm thinking something along the lines of
SELECT TOP 6 cols
FROM tables
WHERE DATENAME(weekday, dateCol) = DATENAME(weekday, GETDATE());
July 29, 2013 at 12:04 pm
Viewing 15 posts - 31 through 45 (of 47 total)