guamlet
Board Regular
- Joined
- Dec 29, 2002
- Messages
- 145
I have some patient records in a massive database for surgery. Some patients have had multiple surgeries on different dates. One table shows the patient's medical record number and their entry date and exit dates from the hospital along with other data that i want to capture on their stay (e.g. length of stay, number of central lines, etc). the other table shows the medical record number and their date of surgery along with surgical specific data (time in the operating room, name of operation, etc). I need a way to create a query where I can match the two tables using the medical record number and the requirement that the surgery date be between the admission and discharge dates. I'm thinking I need to do it in SQL instead of the normal query design GUI, but I'm not that familiar with SQL syntax to write it, so troubleshooting would be a nightmare (is it because my syntax is wrong, or is it because the logic is wrong, etc).
Any suggestions?
Any suggestions?