→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
elKastr0nom
Engaged Sweeper II
How would I go about adding one of these fields to my current report?

Here is my current report:

Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tsysassettypes.AssetTypename,
tsysassettypes.AssetTypeIcon10 As icon,
tblassets.Domain,
tblassets.Username,
tblassetcustom.PurchaseDate,
tblassetcustom.Warrantydate,
tblassets.Mac,
tblassetcustom.Manufacturer,
tblassetcustom.Model,
tblassetcustom.Serialnumber,
tsysIPLocations.IPLocation
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join lansweeperdb.dbo.tsysIPLocations On tsysIPLocations.LocationID =
tblassets.LocationID
Where tsysassettypes.AssetTypename = 'Windows'
3 REPLIES 3
Andy_Sismey
Champion Sweeper III
You just want to add this line to your select:
  'CN=' + tblassets.AssetName + ',' + tblADComputers.OU As DN
elKastr0nom
Engaged Sweeper II
That reports provides "no results found".
Andy_Sismey
Champion Sweeper III
You could do it this way :

Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tsysassettypes.AssetTypename,
tsysassettypes.AssetTypeIcon10 As icon,
tblassets.Domain,
tblassets.Username,
tblassetcustom.PurchaseDate,
tblassetcustom.Warrantydate,
tblassets.Mac,
tblassetcustom.Manufacturer,
tblassetcustom.Model,
tblassetcustom.Serialnumber,
tsysIPLocations.IPLocation,
'CN=' + tblassets.AssetName + ',' + tblADComputers.OU As DN
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join lansweeperdb.dbo.tsysIPLocations On tsysIPLocations.LocationID =
tblassets.LocationID
Inner Join lansweeperdb.dbo.tblADComputers On tblassets.AssetID =
tblADComputers.AssetID
Where tsysassettypes.AssetTypename = 'Windows'