Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #107.70K
~257 People Reached
Favorite Forums
Favorite Tags

1 Posted Topic

Member Avatar for Ian_7

You need a ';' before the with. And it would be better to do something like this: ;with MaxAndMinByHour ( [Chg_Created Interface (Max)], [Chg_Created Interface (Min)], [mHour] ) as ( select max(ObjId) as 'Chg_Created Interface (Max)', min(ObjId) as 'Chg_Created Interface (Min)', datepart(hh, LastCngDtime) as 'mHour' from Chg(nolock) where Lastcngdtime between …

Member Avatar for MaxMaherC
0
257

The End.