I am customizing dashboards for my internal IT team and things are a bit cluttered using a bunch of Dashlets. I need assistance performing a UNION to condense some of these dashlet queries into one.
Each time I input a UNION into my OQL Query I receive an error stating "Unexpected token NAME - found 'UNION' at line XX".
Any assistance, guidance, or direction you can give would be greatly appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is all assuming that I need to use a UNION. Judging by what I've read it seems logical that in effort to combine data from multiple tables I would need to utilize a UNION.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
According to OQL grammar it does not contain a UNION statement.
If you need only one class type, you should consider using the WHERE statement.
If you need data from multiple classes, probably you cannot get the data in a single QUERY, altough depending which classes are involved you may want to try quering its superclass.
eg: FunctionalCI class could be used for querying both VirtualMachine and phisical Servers classes in the same OQL query.
The con for this method is that all the tables should be derived from the same super class and you can only use the fields of the superclass for the WHERE part.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am customizing dashboards for my internal IT team and things are a bit cluttered using a bunch of Dashlets. I need assistance performing a UNION to condense some of these dashlet queries into one.
Each time I input a UNION into my OQL Query I receive an error stating "Unexpected token NAME - found 'UNION' at line XX".
Any assistance, guidance, or direction you can give would be greatly appreciated.
This is all assuming that I need to use a UNION. Judging by what I've read it seems logical that in effort to combine data from multiple tables I would need to utilize a UNION.
Hi Thomas :
According to OQL grammar it does not contain a UNION statement.
If you need only one class type, you should consider using the WHERE statement.
If you need data from multiple classes, probably you cannot get the data in a single QUERY, altough depending which classes are involved you may want to try quering its superclass.
The con for this method is that all the tables should be derived from the same super class and you can only use the fields of the superclass for the WHERE part.
UNIONs will be (hopefully) supported in iTop 2.2, to be released in July!
Thank you for your time and support. I look forward to future improvements as well as digging into your recommendation query technique.
Send your OQL original or what class do you want to filter in your OQL, maybe we can help.