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
1 Posted Topic
Re: CTE Query
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 …
The End.
MaxMaherC