This question is more related to the internal InterSystems TrakCare structures rather than general SQL. Given the query you have you can't divide a ward into two because your query will return ward IDs and all further processing is done inside GetTotalRegular
and ProcessData
procedures presumably based on current ward ID. So you need to look into what those procedures are doing and in case of ward 5C
process bed data into two rows or temporary globals rather than just one.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…