cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Bleonard
Engaged Sweeper
Good day all. I've been working with the Reporting process, and trying to have a single report display information for both Windows and Apple hardware. Certainly I can get this individually and export to Excel to combine the data. But I'm hoping it's possible to create a single combined report. The hardware details for the machines are in different tables of course. I've tried using UNION with two SELECT statements, but receive unexpected token error. A single SELECT statement using OR in the From selection area across multiple tables does not appear to work for me either (invalid select statement). Does anyone know if this report is possible and how it might be done within Lansweeper reporting? Any help appreciated. Thanks
1 ACCEPTED SOLUTION
Jeremy_D
Champion Sweeper
Providing support or instructions for making UNION queries is not something that we can do, unfortunately. You could, perhaps, read this article online, which explains how to use the UNION statement and which conditions have to be met. Playing around with the UNION statement in order to combine two or several reports can be tricky, but is technically possible. Keep in mind though:
  • There needs to be exactly the same number of columns after both SELECT statements.
  • Not only does the number of columns have to be the same but datatypes must also be equal to one another.

If the number of fields you are trying to combine is limited, you could also use the Coalesce function instead of UNION. This can be implemented more easily and quickly.

View solution in original post

1 REPLY 1
Jeremy_D
Champion Sweeper
Providing support or instructions for making UNION queries is not something that we can do, unfortunately. You could, perhaps, read this article online, which explains how to use the UNION statement and which conditions have to be met. Playing around with the UNION statement in order to combine two or several reports can be tricky, but is technically possible. Keep in mind though:
  • There needs to be exactly the same number of columns after both SELECT statements.
  • Not only does the number of columns have to be the same but datatypes must also be equal to one another.

If the number of fields you are trying to combine is limited, you could also use the Coalesce function instead of UNION. This can be implemented more easily and quickly.