Forum Replies Created

Viewing 15 posts - 46 through 60 (of 66 total)

  • RE: Help with query logic

    Got it! I added two more Derived tables to flatten the data out. Went from 4 records to 2

    select C.MRN,

    C.FirstName,

    ...

  • RE: Way to "Roll" Data

    Got it! I added two derived tables to the query to flatten it out. Seemed to do the trick:

    select C.MRN,

    C.FirstName,

    ...

  • RE: Way to "Roll" Data

    Unfortunately it's patient data, so I can't give you real data. Would the actual query help?

  • RE: Way to "Roll" Data

    That looks great. How did you do that? Can you paste the query here?

  • RE: Way to "Roll" Data

    Pietlinden...I couldn't get the file to open in SQL Server. It's a "me" problem. Can you give a snapshot of the results?

  • RE: Help with query logic

    I think the issue is the requestor wants the insurance and fill date listed...so, you end up with 4 records. For example..

    Name ...

  • RE: Way to "Roll" Data

    Pietlinden, for some reason I can't open the attachment

  • RE: Help with query logic

    Mohamed, that is alot cleaner! Thanks. It's been a while since I wrote SQL. I'm still getting the $5 copay on all 4 records...do I try the...

  • RE: Help with query logic

    I pretty much duplicated the original query and made them derived tables. One is pulling the specific Insurance and the other is any insurance for that Medication...And then joined...

  • RE: Way to "Roll" Data

    Pietlinden, isn't CoPay already in the Group By of Table A? Sorry, I'm a little confused

  • RE: Help with query logic

    Sorry, Mohammed....I removed the person's birthday and put in a fake birthday...when I drug it down it changed for each line.

  • RE: Way to "Roll" Data

    Is there a way to attach an excel file? My results example would probably display cleaner

  • RE: Way to "Roll" Data

    select distinct A.*

    from

    (select

    HR.MRN MRN

    ,HR.FIRST_NAME FirstName

    ,HR.LAST_NAME LastName

    ...

  • RE: Way to "Roll" Data

    That data in the post is actually sample data. I removed name, etc.

  • RE: Help with query logic

    Ok, I got it figured out. But, here's what I'm running into...I have what each Insurance is paying...but the patient co pay is displaying for each record. For example:

    MRNFirstNameLastNameDate_of_BirthDate_Filled...

Viewing 15 posts - 46 through 60 (of 66 total)