79127361

Date: 2024-10-25 21:35:04
Score: 0.5
Natty:
Report link

The following SQL should give you the result you are looking for:

SELECT Table1.fldOrder, 
       (SELECT TOP 1 Table2.fldT2Date 
        FROM Table2 
        WHERE Table2.fldOrder=Table1.fldOrder AND Table2.fldT2Date<=Table1.fldT1Date
        ORDER BY Table2.fldT2Date DESC;) AS fldDate 
FROM Table1;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: BobS