Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 25th, 2012  |  syntax: None  |  size: 0.20 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Left join on first value from right table?
  2. SELECT (SELECT TOP 1 D2.DiDateEnd
  3.     FROM Diary AS D2
  4.     WHERE D2.DiDateEnd > D1.DiDateEnd
  5.     ORDER BY D2.DiDateEnd) AS RightTableTime, *
  6. FROM Diary AS D1