Forum Replies Created

Viewing 15 posts - 3,121 through 3,135 (of 4,820 total)

  • RE: Questions on filetables

    Have you considered using the IN MEMORY option for the most recent data. You may be keeping a year's worth, but perhaps the most frequently read data should be...

  • RE: SUM and Group using IN clause

    Unless you are not explaining some critical detail, how about this:

    SELECT CID,

    MyCodes,

    SUM(Hours)

    FROM MyClrTbl

    WHERE MyCodes IN ('Full', 'part', 'Contract')

    GROUP BY CID, MyCodes;

  • RE: Exclude the negative value in OT calculation

    Chris,

    Now that I've seen that part of it, I'm now absolutely certain that the query I was trying to work on was faulty. I'm pretty sure that the...

  • RE: Exclude the negative value in OT calculation

    drew.allen (11/3/2016)


    I stated on another thread that the number of different posts for this same query indicate that the OP is purposely fragmenting the discussion to hide the complexity of...

  • RE: Total Sum is not Calculating in event of Multiple Clock events

    Chris Harshman (11/2/2016)


    sgmunson (11/2/2016)


    While this appears to be "fixed"... I have to ask why an hour is being added to the creation date to get the event date?

    This is...

  • RE: Exclude the negative value in OT calculation

    philand3 (11/2/2016)


    experts,

    how to exclude the negative value in this OT calculation,

    <<removed posted query for brevity>>

    This is in the category of double-posting... and hoping for an answer that doesn't disagree with...

  • RE: Total by Group.

    philand3 (11/2/2016)


    hi here OT is computed from dutyhours vs hoursworked.

    i am not looking t OT instead my issue is with dutyhours incorrect computation.

    Checking again to see where went wrong with...

  • RE: Total by Group.

    philand3 (11/2/2016)


    Hi,

    i am using following query to bring the following result,

    incorrect result,

    The ONLY way you can get a NEGATIVE VALUE for a SUM is when at least one of the...

  • RE: Total Sum is not Calculating in event of Multiple Clock events

    While this appears to be "fixed"... I have to ask why an hour is being added to the creation date to get the event date?

    See this part of the...

  • RE: Total by Group.

    philand3 (11/2/2016)


    here you go with DDL & DML,

    DDL

    CREATE TABLE action (

    action_id int NOT NULL,

    creation_date datetime,

    PRIMARY KEY (action_id)

    );

    CREATE TABLE action_history (

    action_id int NOT NULL,

    person_id nvarchar(15),

    person_num nvarchar(40),

    ...

  • RE: Filling the missing rows/gap in the data

    Maybe this can shed light on what needs doing:

    CREATE TABLE #TEST_DATA (

    COMPANY char(2),

    AREAS char(2),

    PRODUCT char(2),

    MARKET char(2),

    SUBTERRITORIES char(4),

    [YEAR] int,

    [MONTH] int,

    UNITS int

    );

    INSERT#TEST_DATA (COMPANY, AREAS, PRODUCT, MARKET, SUBTERRITORIES, [YEAR], [MONTH], UNITS)

    VALUES('AA','BB','AB','AC','ISO1',2016,8,15),

    ('AA','BB','AB','AC','ISO1',2016,9,22),

    ('AA','BB','AB','AC','ISO2',2016,7,17),

    ('AA','BB','AB','AC','ISO2',2016,8,19),

    ('AA','BB','AB','AC','ISO3',2016,7,36),

    ('AA','BB','AB','AC','ISO3',2016,8,45),

    ('AA','BB','AB','AC','ISO3',2016,9,52),

    ('AA','BB','AB','AC','ISO4',2016,7,6),

    ('AA','BB','AB','AC','ISO4',2016,9,12);

    DECLARE @START_YEAR AS...

  • RE: Query Help -Orgstructure count -TOTAL levels distinct required

    mytesting9 (11/2/2016)


    Please perform below steps

    We have different columns Rootlevel,level1,level2,level3 to Level6 .

    Now Based on Each and every level(parent ,child )levels are there .Require a query all the distinct level ...

  • RE: Query Help -Orgstructure count -TOTAL levels distinct required

    Hate to say it without looking at the spreadsheet, but your wording suggests this is some kind of homework or test question. We don't do homework here, and...

  • RE: Record Selection

    How about this one, which specifies the exact conditions of the original post:

    CREATE TABLE #tst (

    Id int,

    Unit int,

    Selct varchar(25),

    Rtm varchar(10),

    Agnt varchar(10)

    );

    INSERT INTO #tst (Id, Unit, Selct, Rtm, Agnt)

    SELECT 1001, 1,...

  • RE: Can anyone help optimize runtime on a dimension creating query?

    Yes, Jeff, I saw that bit about it being based on CLR later in the day (although not from your post), but figured if they used CLR then they "MUST"...

Viewing 15 posts - 3,121 through 3,135 (of 4,820 total)