RE: how to restrict query results using date calculations

From: William Threlfall <William.Threlfall_at_albertahealthservices.ca>
Date: Thu, 30 Jan 2014 13:35:08 -0700
Message-ID: <36800EC4761690448F1B444A1AEF44BB0E51E3B1_at_EXMBXC5.crha.bewell.ca>



Hi Riyaj,

Thank You! You are correct, I don't yet know anything about analytic functions, but I'm reading about them now. I modified the code and now it seems to be calculating Last Tx date and Years Since Last Tx correctly.

However, I still cannot see any way to select out only patients where Years Since Last Tx is >= 5.0. I can't use the MAX function in the WHERE clause, and "Years Since Last Tx" is an invalid identifier in the WHERE clause.

This can't be that difficult to do. Do you have any suggestions for me?

Thanks, - Bill.



This message and any attached documents are only for the use of the intended recipient(s), are confidential and may contain privileged information. Any unauthorized review, use, retransmission, or other disclosure is strictly prohibited. If you have received this message in error, please notify the sender immediately, and then delete the original message. Thank you.
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 30 2014 - 21:35:08 CET

Original text of this message