→ The Lansweeper Customer Excellence Awards 2024 - Submit Your Project Now! Learn More & Enter Here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bd
Engaged Sweeper III
I am trying to develop a report that shows data for both devices and computers in one report:

Device Name or Computer Name (depending on the table it resides in)
IP Address (last known)
Location
Department
Building

How is this possible? I tried doing a union but the report writer doesn't let me or I just don't know how to do it correctly.
2 REPLIES 2
bd
Engaged Sweeper III
Thank you very much, I just had to change the join in the first select to a left join because all my computers don't have all the information populated yet and all records were returned.
Hemoco
Lansweeper Alumni
Try this:

Select tblComputers.Computer As Displayname, tblComputers.LastknownIP As
ipaddress, tblCompCustom.Location, tblCompCustom.Department,
tblCompCustom.Building
From tblComputers Inner Join
tblCompCustom On tblComputers.Computername = tblCompCustom.Computername
Union
Select tblcustdevices.Displayname, tblcustdevices.Ipaddress,
tblcustdevices.Location, tblcustdevices.Department, tblcustdevices.Building
From tblcustdevices