
I have created an SQL Fiddle with the basic setup done. Keep in mind that MAX() is an aggregation function, you'll always get only one row in response when you put it in the field list. SELECT recordid, MIN(startdate), MAX(enddate) FROM tmp GROUP BY recordid The most simple attempt (below) doesn't work highlighting the problem that MIN and MAX will ignore NULLS (source: ). SQL WHERE clause along with the SQL MAX() can be used as a subquery to find the maximum value of a column based upon some condition. It is important that I maintain the NULL value of the EndDate and treat this as the maximum value. SQL MAX() on date value: Here we have discussed the usage of SQL MAX() function on date type of column of a table. StartDate is not nullable so I don't need to worry about this but I need the MAX(EndDate) to signify that this is currently a running timespan. In fact, a list can contain words as well as numbers (as in the message 1 start 768), so long as it begins with a number. MSP® is a framework for delivering best-practice in the coordination and management of business programmes. Max recognizes a list whenever it sees a message consisting of a number followed by anything. The Managing Successful Programmes (MSP)® Overview classroom course provides delegates with the skills required to use MSP® within business strategy in order to meet objectives and goals. the table has a schema similar to: ID INT NOT NULL IDENTITY(1,1)Īnd I am trying to work out the start and end dates for each record id, so the minimum StartDate and maximum EndDate. The message need not (but may) begin with the word list. The sourcemsps attribute and redundantmsps attribute are mutually exclusive. If redundant MSPs are to be used, you can either use this attribute to specify the source MSPs to use, or use the redundantmsps attribute.



I have a table where I am storing timespan data. Optional values are MSP-name or MSP-ID (one of those values is required, but not both), and MSP-IP-address.
