(select MsgTable.ID, MAX(MsgTable.Time) as t from MsgTable group by MsgTable.ID)
(select MsgTable.ID, MAX(MsgTable.Time) as t from MsgTable group by MsgTable.ID) as G
Msg 156, Level 15, State 1, Line 12 Incorrect syntax near the keyword 'as'.
(select MsgTable.ID, MAX(MsgTable.Time) as t from MsgTable group by MsgTable.ID) As G
SELECT a.X, b.Y from MyTable a JOIN (SELECT ID, x AS Y FROM MyTable) B ON a.ID = b.ID
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)