Move column data from "main record" to another row

  • 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?




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

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

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

  • 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.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • 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 4 (of 4 total)

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