Informix

 View Only
  • 1.  9700: Routine (plus) ambiguous - more than one routine resolves to given signature.

    Posted Tue December 17, 2019 10:19 AM
    On the recent Informix roadshow presentation, there was a query to showcase the CTE implementation, and I cannot get it to work ( the 'THANK YOU!' query ).
    I am using "IBM Informix Dynamic Server Version 14.10.FC3DE" on linux and I query is failing with error 9700 .
    I do not fully understand the query, but the following simpler example gives the 9700 error:

    select
      sum( '#'::lvarchar )
    from
      systables
    where
      tabid = 1
    ;
    9700: Routine (plus) ambiguous - more than one routine resolves to given signature.

    I am not sure if I can publish the original query, but for those that have been to the Informix roadshow and know what I am talking about, has anyone got the query to execute?

    ------------------------------
    Luis Marques
    ------------------------------

    #Informix


  • 2.  RE: 9700: Routine (plus) ambiguous - more than one routine resolves to given signature.

    Posted Tue December 17, 2019 10:51 AM
    Luis:
     
    Per developer, this needs to be created as well:
     

    create function plus(s1 lvarchar, s2 lvarchar)

                returning lvarchar;

                return s1 || s2;

       end function;

    • export DBACCESS_COLUMNS=180
    • produces an ASCII-art image of the Mandelbrot set

       dbaccess test Mandelbrot.sql 2>/dev/null |  grep -v '^$'

    Scott Pickett
    IBM Informix WW Technical Sales
    IBM Informix WW Cloud Technical Sales
    IBM Informix WW Cloud Technical Sales ICIAE
    IBM Informix WW Informix Warehouse Accelerator Sales
    Boston, Massachusetts USA
    spickett@us.ibm.com
    617-899-7549
    33 Years Informix User
     
    The Informix Roadshow page is here:

    https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en_US#/wiki/Informix%20Roadshow%20-%20Informix%20is%20Everywhere

    Shortcut to the Informix Roadshow Page:

    http://bit.ly/ifmx_roadshow

    All presentations and the agenda used by the Roadshow can be found there.
     
    The current ZACS Informix Page can be found here:
     
     
     





  • 3.  RE: 9700: Routine (plus) ambiguous - more than one routine resolves to given signature.

    Posted Tue December 17, 2019 11:47 AM
    Thank you Scott.

    That was the piece that was missing. After creating the function you posted, the query works fine.

    Best regards,

    ------------------------------
    Luis Marques
    ------------------------------



  • 4.  RE: 9700: Routine (plus) ambiguous - more than one routine resolves to given signature.

    Posted Tue December 17, 2019 07:01 PM
    Aha! Now you have the most useful query ever working! :)

    ------------------------------
    FERNANDO NUNES
    ------------------------------



  • 5.  RE: 9700: Routine (plus) ambiguous - more than one routine resolves to given signature.

    Posted Wed December 18, 2019 09:47 AM
    Guess I was not clear enough in my deck as this code was 1-2 slides previous, depending on the deck version.
     
    Scott Pickett
    IBM Informix WW Technical Sales
    IBM Informix WW Cloud Technical Sales
    IBM Informix WW Cloud Technical Sales ICIAE
    IBM Informix WW Informix Warehouse Accelerator Sales
    Boston, Massachusetts USA
    spickett@us.ibm.com
    617-899-7549
    33 Years Informix User
     
    The Informix Roadshow page is here:

    https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en_US#/wiki/Informix%20Roadshow%20-%20Informix%20is%20Everywhere

    Shortcut to the Informix Roadshow Page:

    http://bit.ly/ifmx_roadshow

    All presentations and the agenda used by the Roadshow can be found there.
     
    The current ZACS Informix Page can be found here:
     
     
     





  • 6.  RE: 9700: Routine (plus) ambiguous - more than one routine resolves to given signature.

    IBM Champion
    Posted Tue December 17, 2019 11:34 AM
    you need to define what plus means in the context of a lvarchar.  If you want to mean different things to different values then you  can code that in the plus function or cast to a 'special' lvarchar type and go from there

    Cheers
    Paul

    ------------------------------
    Paul Watson
    ------------------------------



  • 7.  RE: 9700: Routine (plus) ambiguous - more than one routine resolves to given signature.

    Posted Tue December 17, 2019 11:52 AM
    Thank you Paul.

    Scott provided the appropriate function for the query to work.
    The error message was misleading me, I was assuming that there were multiple "plus" definitions already defined, that were ambiguous, not that I needed to define the "plus" operation for the "SUM" aggregation to work for "LVARCHAR".

    Best regards,

    ------------------------------
    Luis Marques
    ------------------------------