Home Forums SQL Server 2008 T-SQL (SS2K8) T sql for patient arrivals, transfers In and Out and discharges and census on a hospital floor by hour RE: T sql for patient arrivals, transfers In and Out and discharges and census on a hospital floor by hour

  • Sorry the earlier output expected didn't formatted properly so i have split it into two halves ( by seperating columns)

    First Half of the result

    Date Location ArvlCountArvllHourTrfInCountTrfInHour TrfOutCount TrfOutHour

    11/5/2013HOLD19 1 16

    11/5/20135W 1 16

    11/6/20135W

    11/7/20135W

    11/8/20135W

    Second Half

    DateDischsCountDischsHourCensCountCensHour

    11/5/2013 1 9 to 16 hours

    11/5/2013 1 16 to 24 hours

    11/6/2013 1 1 to 24 hours

    11/7/2013 1 1 to 24 hours

    11/8/201311 to 12 hours 1 1 to 12 hours