• John Mitchell-245523 - Wednesday, March 8, 2017 5:42 AM

    This is going to fail if the user who created the record has since been deleted.  Why don't you change the function so it gets the user name instead of the ID, and then you wouldn't need to join to a system view at all?

    John

    Good point. Keep it simple.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]