Last active
November 11, 2018 19:16
-
-
Save gdoddsy/a10c7246f23915518d76de9ca5200dfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH AggregateData AS | |
( | |
SELECT Gate | |
,MAX(RecordedTime) AS MaxRecordedTime | |
FROM dbo.SFOGateInfo | |
) | |
UPDATE AggregateTest | |
SET LastUsedDateTime = AggregateData.MaxRecordedTime | |
FROM AggregateTest | |
INNER JOIN AggregateData | |
ON AggregateData.Gate = AggregateTest.Gate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment