Hi, I am a Total SQL novice, but need to do this. I have a table as follows:
Contract_No ProgressID ReportingPeriod ReportingYear FinalFlag
2185 721 Jan-Dec 2010 Y
2185 831 Jun-Aug 2011 N
2190 895 jun-Sep 2011 Y
2190 840 Jun-Sep 2009 N
The rows I need to pull are the Max of progressID by Contract_No but full row. ie in the example above the query would pull rows 2 and 3 (All 5 fields). Any time I attempt any of this I get various error messages that all fields have to be done as aggregates and can't do grouping if fields are not all aggregates.I'm desparate and any help would be greatly appreciated! Thanks! D
Contract_No ProgressID ReportingPeriod ReportingYear FinalFlag
2185 721 Jan-Dec 2010 Y
2185 831 Jun-Aug 2011 N
2190 895 jun-Sep 2011 Y
2190 840 Jun-Sep 2009 N
The rows I need to pull are the Max of progressID by Contract_No but full row. ie in the example above the query would pull rows 2 and 3 (All 5 fields). Any time I attempt any of this I get various error messages that all fields have to be done as aggregates and can't do grouping if fields are not all aggregates.I'm desparate and any help would be greatly appreciated! Thanks! D