Forum Replies Created

Viewing 15 posts - 31 through 45 (of 47 total)

  • RE: Weekly Best Seller

    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...

  • RE: Weekly Best Seller

    SELECT

    [Product ID]

    , COUNT(IIF([Position] = 1,1,NULL)) [Top Seller Count]

    FROM

    GROUP BY [Product ID]

  • RE: Database monitoring

    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...

  • RE: Cannot Stop File Growth on Data File

    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...

  • RE: PK

    Why have a table with 1 row? Are the developers to lazy to make a config file?

    ALL tables should have a primary key, period. Without it, you've just...

  • RE: SSMS 2012 Restarts Itself

    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...

  • RE: mediator between vendor and VM admin

    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...

  • RE: Reporting Services Errors SQLServerAgent exceeded the allowed timeout

    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...

  • RE: Stored Proc slow on secondary only

    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...

  • RE: Printed Books Vs E-Books

    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...

  • RE: Bulk Data

    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...

  • RE: ObjectType Reference from Default Trace

    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...

  • RE: The Ratio

    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. ...

  • RE: The Ratio

    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,...

  • RE: Find the last 6 Tuesdays or Wed or Whatever day.

    I'm thinking something along the lines of

    SELECT TOP 6 cols

    FROM tables

    WHERE DATENAME(weekday, dateCol) = DATENAME(weekday, GETDATE());

Viewing 15 posts - 31 through 45 (of 47 total)