Menu

iTOP OQL UNION

2015-05-27
2015-06-22
  • Thomas Williams

    Thomas Williams - 2015-05-27

    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.

     
  • Thomas Williams

    Thomas Williams - 2015-05-27

    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.

     
  • Jaime Valero

    Jaime Valero - 2015-05-27

    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.

    • 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.

     
  • Denis

    Denis - 2015-05-28

    UNIONs will be (hopefully) supported in iTop 2.2, to be released in July!

     
  • Thomas Williams

    Thomas Williams - 2015-05-28

    Thank you for your time and support. I look forward to future improvements as well as digging into your recommendation query technique.

     
  • Thiago Arcanjo

    Thiago Arcanjo - 2015-06-22

    Send your OQL original or what class do you want to filter in your OQL, maybe we can help.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.