→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
abetzold
Engaged Sweeper III
Select count(*),
tblADGroups.Name As ADGroupName
From tblADMembership
Left Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Right Join tblADusers On tblADMembership.ChildAdObjectID =
tblADusers.ADObjectID
Where tblADGroups.Name Like 'VPN%'
group by tblADGroups.Name

Can someone help me with this? It works in management studio but not in LanSweeper.
1 ACCEPTED SOLUTION
Bruce_B
Lansweeper Alumni
The report was likely being rejected by the report builder because your count column didn't have an alias.

Select Count(*) As Total,
tblADGroups.Name As ADGroupName
From tblADMembership
Left Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Right Join tblADusers On tblADMembership.ChildAdObjectID =
tblADusers.ADObjectID
Where tblADGroups.Name Like 'VPN%'
Group By tblADGroups.Name

View solution in original post

1 REPLY 1
Bruce_B
Lansweeper Alumni
The report was likely being rejected by the report builder because your count column didn't have an alias.

Select Count(*) As Total,
tblADGroups.Name As ADGroupName
From tblADMembership
Left Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Right Join tblADusers On tblADMembership.ChildAdObjectID =
tblADusers.ADObjectID
Where tblADGroups.Name Like 'VPN%'
Group By tblADGroups.Name