Home Forums SQL Server 2008 T-SQL (SS2K8) SQL Query to select one row and fill missing columns from another matching row. RE: SQL Query to select one row and fill missing columns from another matching row.

  • Question to OP: Can the name change? - If yes, you cannot partition by name.

    Numbers for MartialStatus and EmploymentStatus can change from higher to lower, therefore you cannot really use MAX(), as I believe what you really want to see is the latest non-null value for them.

    Can Email be NULL? If so, than it should be some logic for email as well.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]