Move column data from "main record" to another row

  • NineIron


    Points: 12519

    This report contains a patient's antibiotic dose along with the two most recent lab results. The two lab results cause a duplicate row with the patient's antibiotic information. I want the report to only list one record for the antibiotic and then on a separate row(s), have the lab results. See image. The yellow highlighted area is what is current. I need it to show up like the second, unhighlighted row. Any thoughts?




  • Site Owners

    SSC Guru

    Points: 80380

    Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • pietlinden

    SSC Guru

    Points: 62456

    Got some dummy data? Create table script... you know the drill.

  • Jeffrey Williams 3188

    SSC Guru

    Points: 88122

    This is a display/report issue - it can and should be done in the report and not in SQL Server.  Your example does not include all of the data elements needed which would be required for any solution.

    What you have outlined is not possible in SQL - as you have different data elements in a single column.  For example, you have PatientName and Drug Name in one column and there is no way to determine when it would display drug name as opposed to PatientName.

    [font="Verdana"]Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster[/url]
    Managing Transaction Logs[/url]

  • doug.brown


    Points: 5523

    It looks like you probably want to group your report on AccountNumber and/or PatientName.  That gives you a header with that grouping and sub-listings with the details.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply