
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2012 06:56 PM
I've got this report which shows device by room:
I've got this report that shows computers by room:
Is there a way to merge them into one report? So I can have a report that shows all the devices and computers in the same room (Location)?
SELECT TOP 1000000 tsysdevicetypes.itemtypeicon10 AS icon,
tblcustdevices.displayname AS [Device name],
tblcustdevices.model,
tblcustdevices.vendor,
tblcustdevices.location,
tblcustdevices.devicekey,
tblcustdevices.purchasedate,
tblcustdevices.serialnumber,
tblcustdevices.contact
FROM tblcustdevices
INNER JOIN tsysdevicetypes
ON tsysdevicetypes.itemtype = tblcustdevices.devicetype
WHERE tblcustdevices.location = 'Room 150'
ORDER BY tblcustdevices.displayname
I've got this report that shows computers by room:
SELECT TOP 1000000 tblcomputers.computername,
tblcomputers.computerunique,
tblcomputers.domain,
tblcompcustom.purchasedate,
tblcompcustom.warrantydate,
tblcompcustom.location,
tblcompcustom.building,
tblcompcustom.department,
tblcompcustom.branchoffice,
tblcompcustom.state,
tblcompcustom.lastchanged,
tblcompcustom.barcode,
tblcompcustom.custom1,
tblcompcustom.lastsaved,
tblcompcustom.firstseen,
tblcompcustom.lastseen
FROM tblcomputers
INNER JOIN tblcompcustom
ON tblcomputers.computername = tblcompcustom.computername
WHERE tblcompcustom.location LIKE 'Room 150'
ORDER BY tblcomputers.computerunique
Is there a way to merge them into one report? So I can have a report that shows all the devices and computers in the same room (Location)?
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
‎04-17-2012 10:47 PM
You need to use 'UNION'
Example
Select field1,field2 from table1
UNION
Select field1,field2 from table2
See: http://msdn.microsoft.com/en-us/library/ms180026.aspx
Example
Select field1,field2 from table1
UNION
Select field1,field2 from table2
See: http://msdn.microsoft.com/en-us/library/ms180026.aspx
11 REPLIES 11

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2013 04:24 PM
jgross wrote:
Is there an update for this for version 5?
Could you please clarify what your specific report should list.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2012 10:47 PM
You need to use 'UNION'
Example
Select field1,field2 from table1
UNION
Select field1,field2 from table2
See: http://msdn.microsoft.com/en-us/library/ms180026.aspx
Example
Select field1,field2 from table1
UNION
Select field1,field2 from table2
See: http://msdn.microsoft.com/en-us/library/ms180026.aspx
