G
G.
I have a query named readmit_2 that lists medical encounters. I need to build
another query that lists only those encounters that are a readmission. The
distinguishing characteristic is the Medical Record # (mr_num). If the mr_num
appears more than once, it is a readmission. However, I need all the records
that appear more than once listed so they can be seen - I just don't want to
see any records that only have one encounter (one mr_num). I am not
completely positive that my query is working correctly. My current SQL code
is:
SELECT *
FROM Readmit_2
WHERE (((Readmit_2.mr_num) In (SELECT MR_num
FROM [Readmit_2]
GROUP BY MR_Num
HAVING Count(MR_Num) > 1)));
Can someone please help with confirming if the code looks correct or if I am
missing something? Thank you.
another query that lists only those encounters that are a readmission. The
distinguishing characteristic is the Medical Record # (mr_num). If the mr_num
appears more than once, it is a readmission. However, I need all the records
that appear more than once listed so they can be seen - I just don't want to
see any records that only have one encounter (one mr_num). I am not
completely positive that my query is working correctly. My current SQL code
is:
SELECT *
FROM Readmit_2
WHERE (((Readmit_2.mr_num) In (SELECT MR_num
FROM [Readmit_2]
GROUP BY MR_Num
HAVING Count(MR_Num) > 1)));
Can someone please help with confirming if the code looks correct or if I am
missing something? Thank you.