→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
‎08-09-2013 07:38 PM
Solved! Go to Solution.
‎08-14-2013 04:02 PM
MustQ wrote:
If there are multiple documents, either comma separate in the same column or create a column for each document?
Select Top 1000000 tblAssets.Assettype,
tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.Image As icon,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Description,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.Memory,
Cast(Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As
numeric) As nvarchar) As [Disk size],
tblAssets.NrProcessors As #CPU,
tblAssets.Processor,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber As Serial,
tblAssets.IPAddress As [IP Address],
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblAssetCustom.State,
tblAssetCustom.OrderNumber,
tblAssetCustom.Comments,
tblAssetCustom.Location,
tblAssetCustom.Department,
tblAssetCustom.Branchoffice,
tblAssetCustom.Custom1 As [Invoice Date],
tblAssetCustom.Custom2 As Vendor,
tblAssetCustom.Custom3 As [P/O #],
tblAssetCustom.Custom4 As [Invoice #],
tblAssetCustom.Custom5 As [Payment Type],
tblAssetCustom.Custom6 As [Invoice Total],
tblAssetCustom.Custom7 As [Price Per Unit],
tblAssetCustom.Custom8 As [Original Assigned User],
tblAssetDocs.Docname,
tblAssetDocs.Docguid,
'http://YourLansweeperServerName:YourPort/AssetActions.aspx?action=getDoc&assetId=' +
Cast(tblAssets.AssetID As nvarchar) + '&docId=' + tblAssetDocs.Docguid As
DocLink,
tblAssetDocs.AddedBy,
tblAssetDocs.Added
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Left Outer Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblAssetDocs On tblAssets.AssetID = tblAssetDocs.AssetID
Where tblAssetCustom.State = 1 And tblDiskdrives.Caption = 'c:'
Order By tblAssets.AssetID,
tblAssetDocs.Docname
‎03-10-2015 11:48 AM
‎08-14-2013 04:02 PM
MustQ wrote:
If there are multiple documents, either comma separate in the same column or create a column for each document?
Select Top 1000000 tblAssets.Assettype,
tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.Image As icon,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Description,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.Memory,
Cast(Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As
numeric) As nvarchar) As [Disk size],
tblAssets.NrProcessors As #CPU,
tblAssets.Processor,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber As Serial,
tblAssets.IPAddress As [IP Address],
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblAssetCustom.State,
tblAssetCustom.OrderNumber,
tblAssetCustom.Comments,
tblAssetCustom.Location,
tblAssetCustom.Department,
tblAssetCustom.Branchoffice,
tblAssetCustom.Custom1 As [Invoice Date],
tblAssetCustom.Custom2 As Vendor,
tblAssetCustom.Custom3 As [P/O #],
tblAssetCustom.Custom4 As [Invoice #],
tblAssetCustom.Custom5 As [Payment Type],
tblAssetCustom.Custom6 As [Invoice Total],
tblAssetCustom.Custom7 As [Price Per Unit],
tblAssetCustom.Custom8 As [Original Assigned User],
tblAssetDocs.Docname,
tblAssetDocs.Docguid,
'http://YourLansweeperServerName:YourPort/AssetActions.aspx?action=getDoc&assetId=' +
Cast(tblAssets.AssetID As nvarchar) + '&docId=' + tblAssetDocs.Docguid As
DocLink,
tblAssetDocs.AddedBy,
tblAssetDocs.Added
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Left Outer Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblAssetDocs On tblAssets.AssetID = tblAssetDocs.AssetID
Where tblAssetCustom.State = 1 And tblDiskdrives.Caption = 'c:'
Order By tblAssets.AssetID,
tblAssetDocs.Docname
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now