Hey everyone,
I'm not an expert in SQL, but so far, I haven't run into anything in Lansweeper that I can't handle. Except for this. I'm trying to create a single report which shows something like this:
Assetname OS Platform
Server1 Windows 2003 esxihost1.contoso.com
Server2 Win 2k15 hyper-vhost1.contoso.com
Server3 Win 2008 R2 Physical
Server4 Windows 3.11 esxihost2.contoso.com
I messed around using IF THEN and CASE statements with no luck. Is there any way to accomplish this?
This is what I have so far:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.OSname As OS,
tHost.AssetName
From tblAssets
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join TblHyperVGuestNetwork
On tblAssets.Mac = TblHyperVGuestNetwork.MacAddress
Inner Join tblHyperVGuest On tblHyperVGuest.hypervguestID =
TblHyperVGuestNetwork.HyperVGuestID
Left Join tblAssets tHost On tHost.AssetID = tblHyperVGuest.AssetID
Inner Join tblVmwareGuestNetwork
On tblAssets.Mac = tblVmwareGuestNetwork.MacAddress
Inner Join tblVmwareGuest On tblVmwareGuest.GuestID =
tblVmwareGuestNetwork.GuestID And tblVmwareGuest.AssetID = tHost.AssetID
Order By tblAssets.AssetName