• I believe what you want is the CROSS APPLY function: https://technet.microsoft.com/en-US/library/ms175156(v=SQL.105).aspx