RE:

  • The explanation for the result is: In TSQL-style joins, where-clauses for the outer table are used to filter the result set (as expected from a where clause), while clauses for the inner table, as the "o.Rats_filename IS NOT NULL" in the example, go into the on-clause in the corresponding ANSI join. As a consequence, you filtered out rows from the inner table "ratsiiafeedtransaction o", so the outer join puts nulls in the result for these columns. You cannot express what you intended in TSQL-style joins, but rather have to use ANSI joins instead.

  • True.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore Roosevelt
    The Scary DBA
    Author of: SQL Server 2022 Query Performance Tuning, 6th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

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

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