February 16, 2011 at 9:19 am
Let me explain this. There are rows of data, Hospitals with machines that need to be tested at different time intervals, and tests are different for different time intervals. These intervals are specifically monthly, bi-annual, annual. If the data row says an annual test was done say 10 months ago then there has to be logic that says for an annual report that is 2 months from being due, this comes up as being due. If the same machine is due for example within 1 month of its biannual test being due, then this is on the list as being due. I imagine I need some case statement and union joins but just cant figure out how to parse each row. Any websites on this??
February 16, 2011 at 9:31 am
nevrstp
If you would post the table definitions, some sample data and desired results, using the procedures and sample code, contained in the first link of my signature block I am sure some one from this site will be able to supply you with tested T-SQL statements to perform what you need to accomplish.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply