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

  • It still doesn't make much sense. Please provide the expected result in a SELECT ... format.

    Something like

    SELECT

    '20131105' as Date,

    'HOLD' as Location,

    1 AS ArvlCount,

    9 AS ArvllHour,

    1 AS TrfInCount,

    16 AS TrfInHour,

    '?' AS TrfOutCount,

    '?' AS TrfOutHour

    UNION ALL

    SELECT ...

    You see what happened? Your expected output doesn't even match the number of colum names you provided.

    Neither did you bother to change the date format.

    I'm out of here until I see something that's ready to use. And I will not complain any more either.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]