Viewing 15 posts - 46 through 60 (of 77 total)
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...
October 6, 2009 at 10:17 am
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...
October 5, 2009 at 2:13 pm
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...
October 5, 2009 at 2:05 pm
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...
October 5, 2009 at 1:56 pm
Lutz,
Thanks a lot. That did it.
Much respect,
DJ Khalif
September 29, 2009 at 2:02 pm
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),...
September 29, 2009 at 11:56 am
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...
September 17, 2009 at 1:03 pm
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,
...
September 17, 2009 at 9:19 am
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...
September 17, 2009 at 9:03 am
WayneS,
Thanks a lot. I used the second statement and I got the results I wanted.
Thanks again.
September 14, 2009 at 5:24 am
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...
September 9, 2009 at 3:24 pm
Wayne and Bob,
Thanks. I'm going to try that Tuesday.
September 6, 2009 at 12:27 pm
Bob,
I want it to read 20510, it should be five characters.
September 5, 2009 at 5:47 pm
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 =...
September 4, 2009 at 10:53 pm
Viewing 15 posts - 46 through 60 (of 77 total)