Informix version in CUCM

Version 1
    This document was generated from CDN thread

    Created by: douglas conklin on 23-09-2010 12:55:05 AM
    Hard to find the right forum for this question.
     
    I'm looking to find out the informix version in CUCM 6, 7, and 8.
     
    I'm querying through executeSQLQuery, and I need to see if Select First, combined with a Union is supported, which apparently only went in in 10.00.xC3.
     
    From informix release notes;
    Version 10.00.xC3 of Dynamic Server introduces support for FIRST in UNION queries,
     
    Here's the fun part, there apparently is a bug in many versions of Informix 10 where the query for the version returns incorrectly.
     
    From the release notes on one version:
    SELECT OWNER FROM SYSTABLES WHERE TABNAME = ' VERSION' RETURNS 9.50C1 , SHOULD BE 10.00C1

    which is exacly what I get, so I can't trust that method.

    admin:run sql SELECT owner FROM systables WHERE TABNAME= ' VERSION'
    owner                           
    ================================
    9.50C1                     

    I have two selects, which both individually work at the CLI, but when I through a union inbetween them, I get a syntax error, so lack of support is my chief suspect.

    from the CLI:
    A syntax error has occurred.

    which is immensly unhelpful in finding the syntax error. AXL at least adds an unhelpful error code -201.

    Subject: RE: Informix version in CUCM
    Replied by: Keith Lunn on 30-09-2010 02:01:48 PM
    Hard to find the right forum for this question.
     
    I'm looking to find out the informix version in CUCM 6, 7, and 8.
     
    I'm querying through executeSQLQuery, and I need to see if Select First, combined with a Union is supported, which apparently only went in in 10.00.xC3.
     
    From informix release notes;
    Version 10.00.xC3 of Dynamic Server introduces support for FIRST in UNION queries,
     
    Here's the fun part, there apparently is a bug in many versions of Informix 10 where the query for the version returns incorrectly.
     
    From the release notes on one version:
    SELECT OWNER FROM SYSTABLES WHERE TABNAME = ' VERSION' RETURNS 9.50C1 , SHOULD BE 10.00C1

    which is exacly what I get, so I can't trust that method.

    admin:run sql SELECT owner FROM systables WHERE TABNAME= ' VERSION'
    owner                           
    ================================
    9.50C1                     

    I have two selects, which both individually work at the CLI, but when I through a union inbetween them, I get a syntax error, so lack of support is my chief suspect.

    from the CLI:
    A syntax error has occurred.

    which is immensly unhelpful in finding the syntax error. AXL at least adds an unhelpful error code -201.


    ========================================
    I use this method; basically cucm uses informix 10.x.
    Here are excamples from CUCM v6.15:
     
    Get the server that is hosting the db:
    SELECT DBINFO('dbhostname') FROM systables WHERE tabid = 1;
     
    Example return :         cucmpub1
     
    Get Informix DB ver:
    SELECT DBINFO('version', 'full') FROM systables WHERE tabid = 1;
     
    Example return:
    IBM Informix Dynamic Server Version 10.00.UC5XAJ
     
     

    Subject: RE: Informix version in CUCM
    Replied by: douglas conklin on 01-10-2010 06:12:16 PM
    Thank you. 
     
    Further investigation has shown shown that the select after the union is a nested select, which is not supported with FIRST. Version was an unfortunate redherring.