Forum Replies Created

Viewing 15 posts - 46 through 60 (of 77 total)

  • RE: Return Daily Values

    MJM,

    I am going to try your code but, I found something funky. The dates run through 9/21/2009 to 10/5/2009 in this case. My problem is, SQL is not returning data...

  • RE: Return Daily Values

    Finally,

    I believe this is it:

    select datename(dw,record_date),

    sum(case when shift = 1 then 1 else 0 end) Shift_1,

    sum(case when shift = 2 then 1 else 0 end) Shift_2,

    sum(case when shift...

  • RE: Return Daily Values

    Ok,

    I added "shift" but I know this is wrong. I would like for it to tally the "shift" totals. For instance,

    Day of Week Shift 1 Shift 2 Shift...

  • RE: Return Daily Values

    Elliot,

    I got this to work but I need to add shift so that I can tally by "shift per day".

    select datename(dw,record_date), count(defect_id) pinhole

    from tbl_assembly_production

    join tbl_assembly_holds on tbl_assembly_production.workorder = tbl_assembly_holds.workorder

    join...

  • RE: Return weekly values

    Lutz,

    Thanks a lot. That did it.

    Much respect,

    DJ Khalif

  • RE: Return weekly values

    Ok, this is close to what I am looking for. I need to return each date once but aggregate my Units Produced.

    SELECT DATEADD(wk, DATEDIFF(wk, 6, DateProd),...

  • RE: Case: Null

    This worked for me. I got the results I wanted.

    SELECT tlkp_Defects.Defect_Title,

    SUM(case WHEN tbl_Assembly_Holds.Disposition_ID = 1 then 1 else 0 end) FixedOnLine,

    SUM(case...

  • RE: Case: Null

    This code generated the zeroes but multiplied defect_ID by Disposition_ID

    SELECT tlkp_Disposition.Disposition_Description, count(*) AS Disposition_Count, tlkp_Defects.Defect_Title,

    SUM(case tlkp_Disposition.Disposition_ID when 1 then tlkp_Defects.Defect_ID else 0 end) FixedOnLine,

    ...

  • RE: Case: Null

    I have been working on something very similar. I replaced sum with count and got closer to my result. The only problem I am having is that the ID does...

  • RE: This removes all zeroes, I need the trailing zero removed

    WayneS,

    Thanks a lot. I used the second statement and I got the results I wanted.

    Thanks again.

  • RE: Data From date Range

    How do I submit the data?

  • RE: Data From date Range

    Jan,

    I did not know that was the criteria for getting help. I have resolved most of my issues or moved on to something else. I don't own the data to...

  • RE: This removes all zeroes, I need the trailing zero removed

    Wayne and Bob,

    Thanks. I'm going to try that Tuesday.

  • RE: This removes all zeroes, I need the trailing zero removed

    Bob,

    I want it to read 20510, it should be five characters.

  • RE: This removes all zeroes, I need the trailing zero removed

    Thanks for replying, i'm just now getting the chance to reply. I have workorder numbers that look like this: 'M205100'. I removed the M with a

    UPDATE tbl_Name

    SET workOrder =...

Viewing 15 posts - 46 through 60 (of 77 total)