I have a complex query that returns a very large rowset containing five columns (I am simplifying it a bit here):
PrimaryKey, DATE1, DATE2, DATE3, DATE4
For each returned row I want to order the dates min to max and then based on each range of dates calculate a value from another query...
Is there a way to do this that is efficient?
SQL Server, Stored Proc...
Thanks in advance.
PrimaryKey, DATE1, DATE2, DATE3, DATE4
For each returned row I want to order the dates min to max and then based on each range of dates calculate a value from another query...
Is there a way to do this that is efficient?
SQL Server, Stored Proc...
Thanks in advance.