
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2015 10:26 PM
Hi folks- I have a decent report that I got some help with a year or so back; but; I need to filter it so that it only pulls machine names that start with
dt
lt
sff
is there any easy way to do this? here is what I have so far- just pulls everything:
Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblADusers.Displayname,
tsysIPLocations.IPLocation,
tblAssets.Lastseen,
tblOperatingsystem.Caption,
tblAssets.IPAddress
From tblAssets
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Order By tsysIPLocations.IPLocation,
tblAssets.AssetName
dt
lt
sff
is there any easy way to do this? here is what I have so far- just pulls everything:
Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblADusers.Displayname,
tsysIPLocations.IPLocation,
tblAssets.Lastseen,
tblOperatingsystem.Caption,
tblAssets.IPAddress
From tblAssets
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Order By tsysIPLocations.IPLocation,
tblAssets.AssetName
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2015 11:18 AM
Add the below to the Criteria column of the tblAssets.AssetName expression. Keep in mind that this is standard SQL syntax. I would recommend reviewing some tutorials on SQL operators, like this one for instance, as this will make building and modifying reports a lot easier.
Like 'dt%' or Like 'lt%' or Like 'sff%'
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2015 11:18 AM
Add the below to the Criteria column of the tblAssets.AssetName expression. Keep in mind that this is standard SQL syntax. I would recommend reviewing some tutorials on SQL operators, like this one for instance, as this will make building and modifying reports a lot easier.
Like 'dt%' or Like 'lt%' or Like 'sff%'
