glthornton
Programmer
Hi everyone,
Setup Info:
Version: CR XI
Platform: Win XP Pro
Connection Type: ODBC (RDO) to a SQL 2003 database
I've run into a snag when trying to use the "Minimum" function in a Group Selection formula. I am trying to extract records from a database based upon the first date that a patient was admitted. I thought that by using the mimimum function for as a group formula would work, but it doesn't. Let me give you an example of what I'm trying to do:
Sample Database Data:
And my report should only contain the data in which the patient first admitted (in this case August 2006), therefore, everything is based on the Admit_Date (Grouped by MRN). So I am only looking for the following data to be returned:
Am I using the correct approach by using the "Minimum" function? Does anyone have any suggestions as a better way to perform this type of extract?
Any and all suggestions would greatly be appreciated.
Thank you,
glthornton
Setup Info:
Version: CR XI
Platform: Win XP Pro
Connection Type: ODBC (RDO) to a SQL 2003 database
I've run into a snag when trying to use the "Minimum" function in a Group Selection formula. I am trying to extract records from a database based upon the first date that a patient was admitted. I thought that by using the mimimum function for as a group formula would work, but it doesn't. Let me give you an example of what I'm trying to do:
Sample Database Data:
Code:
MRN Acct# Name Admit_Date
123 F1332 Test,Patient 1 01/05/2003
123 S3233 Test,Patient 1 08/01/2006
234 F9090 Test,Patient 2 08/03/2006
234 F6732 Test,Patient 2 09/15/2006
345 F7633 Test,Patient 3 08/17/2006
456 S6453 Test,Patient 4 09/01/2004
And my report should only contain the data in which the patient first admitted (in this case August 2006), therefore, everything is based on the Admit_Date (Grouped by MRN). So I am only looking for the following data to be returned:
Code:
MRN Acct# Name Admit_Date
234 F9090 Test,Patient 2 08/03/2006
345 F7633 Test,Patient 3 08/17/2006
Am I using the correct approach by using the "Minimum" function? Does anyone have any suggestions as a better way to perform this type of extract?
Any and all suggestions would greatly be appreciated.
Thank you,
glthornton