Jump to content

scgibson

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About scgibson

  • Rank
    Newbie
  1. I tried as suggested above SELECT mrp_part, SUM(mrp_qty) as quantity, mrp_due_dateFROM vwMRPGrossReqFilteredGROUP BY mrp_part, mrp_due_date however, it doesnt summarise correctly due to the grouping of the part. I need to summarise IF part = 'A' and part = 'B' else just return the value of each individual part thus D 4 13/08/2012A 10 14/08/2012B 15 14/08/2012C 10 14/08/2012should look likePart Qty DateA 25 14/08/2012C 10 14/08/2012D 4 13/08/2012
  2. Hi,I have the following table Part Qty Date D 4 13/08/2012A 10 14/08/2012B 15 14/08/2012C 10 14/08/2012 and need to summarise row 'A' and 'B', keeping part 'A' name but a total for both 'A' and 'B'. Like below: Part Qty Date A 25 14/08/2012C 10 14/08/2012D 4 13/08/2012 Is this possible?Thanks,Stu
  3. scgibson

    Distint Records

    I have the following 'status' table which gets updated with a new record at each step of the process. I need a view to return all records with the latest transdate for each prno. Status TransDate PRNo1 2012-01-31 16:19:56.000 11 2012-02-01 10:30:36.000 20 2012-02-01 10:45:01.000 31 2012-02-08 12:30:17.000 42 2012-02-09 12:30:17.000 413 2012-02-15 11:47:42.000 43 2012-02-15 12:50:15.000 4 View needs to return the following Status TransDate PRNo1 2012-01-31 16:19:56.000 11 2012-02-01 10:30:36.000 20 2012-02-01 10:45:01.000 33 2012-
  4. I need some help being a newbie to this game...Running SQL 2008 on W2003. Source table contains the following fields.Name Department Status---- ---------- ------Stuart IT 1Kate IT 4Marc Finance 8Mick Quality 6Stuart IT 8 Report needs to return the count of the status field for each department depending on the status range of numbers, so... status 1 to 8 = 'submitted'status 7 to 8 = 'realised'Thus the report of the above table should look like: Department Submitted Realised---------- --------- --------IT 3 1Finance 1 1Quality 1 0
×
×
  • Create New...