Forum Replies Created

Viewing 15 posts - 106 through 120 (of 124 total)

  • RE: Running Total

    That what I cant do I need to make a that column and add the totals together

    so the last column would look like this

    53

    70

    79

    88

    95

    98

    100

  • RE: Running Total

    This query is returning almost what I need,

    SELECT

    a1.Docket_Category,

    COUNT(a1.Docket_Id) as Dockets ,

    ...

  • RE: Running Total

    Attempt 1

    SELECT a1.Docket_Category, a1.Docket_Id, count(a2.Docket_Id)/(SELECT Count(Docket_id) FROM SLADB.dbo.DocketTB) Pct_To_Total

    FROM SLADB.dbo.DocketTB a1, SLADB.dbo.DocketTB a2

    WHERE a1.Docket_Id <= a2.Docket_Id

    GROUP BY a1.Docket_Category, a1.Docket_Id

    ORDER BY a1.Docket_Category DESC

    I no this is wrong by...

  • RE: Running Total

    I think may I have gone way of the tracks

    I found this which does what I would like but I cant to make it fit my requirments

    SELECT a1.Name,...

  • RE: Running Total

    I cant add as a table but thats the result I am after

    Docket_Category Count...

  • RE: Running Total

    Docket_CategoryCountCumulative %

    Mechanical ...

  • RE: Running Total

    If I do running total I get a total count for each category

    Mechanical 25

    Electrical 42

    Operator 66

    From all these I need to work out the total percentage of each against the...

  • RE: Running Total

    This is what the end result I am after is but using Category

    http://www.brighthub.com/office/project-management/articles/8708.aspx

    The link may help you to help me as I cant explain it detailed enough

    Jay

  • RE: Running Total

    I hope this is correct and thank you

    USE [SLADB]

    GO

    /****** Object: Table [dbo].[DocketTB] Script Date: 07/09/2012 15:32:43 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TABLE [dbo].[DocketTB](

    [Docket_Id] [int] IDENTITY(1,1)...

  • RE: Running Total

    This is proving difficult for me to understand Sorry all.

    I will try explain again. I am trying to create a pareto report in report viewer so I need to count...

  • RE: Running Total

    Sorry poor maths there

    Mechanical 1 1

    Mechanical 2 3

    Mechanical 5 8

  • RE: SQL query between 2 months

    Wow that's brilliant advice, I will have a read once I am at home and perhaps if I come back with some more information regarding what you have asked and...

  • RE: SQL query between 2 months

    Hi Sean, you might be right but this is very new to me and I have only just started to use SQL. What would you advice. I am not fully...

  • RE: SQL query between 2 months

    This is how my query used to be but was getting duplictes, is it possible to add a DISTINCT clause to this query ?

    SELECT DISTINCT TOP (10) Part_Number, SUM(Qty)...

  • RE: SQL query between 2 months

    Sorry,

    USE [SLADB]

    GO

    /****** Object: Table [dbo].[PartsUsedTB] Script Date: 06/22/2012 16:36:44 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TABLE [dbo].[PartsUsedTB](

    [Id] [int] IDENTITY(1,1) NOT NULL,

    [Date_Used] [datetime] NULL,

    [Engineer] [nchar](50) NULL,

    [Machine] [nchar](30) NULL,

    [Module]...

Viewing 15 posts - 106 through 120 (of 124 total)