update sql script

  • I am using a script to get the patient daily blood glucose entries.

    But I am getting duplicate entries, for eg:- I am getting more than one entries in a day as per [reading type], I only need the latest entry per day based on [reading type].

    Thanks for your help

  • One of the tables that you're performing an INNER JOIN with is a 1->Many relationship; thus you are getting values for each row from the table with the Many relationship.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

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

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