8 Replies Latest reply on Aug 14, 2015 7:47 AM by kisienya

    Execute a virtual procedure from within another virtual procedure

    kisienya

      Hi,

       

      Much appreciate you all for your reliability and help.

       

      I have created a Teiid virtual procedure which I want to execute from within another procedure, as follows;

      CREATE VIRTUAL PROCEDURE

      BEGIN

      SELECT * FROM (EXEC virtual_procedure1 (value1)) AS @categoryid;

      END

       

      I then need to use  the output of virtual_procedure1 as input to a MySQL procedure I imported into Teiid, as follows;

       

      CREATE VIRTUAL PROCEDURE

      BEGIN

      SELECT * FROM (EXEC virtual_procedure1 (value1)) AS @categoryid;

      EXEC procedure2 (@categoryid);

      END

       

      I get the error

      ERROR: TEIID31118 Element "@categoryid" is not defined by any relevant group.

       

      How should I reference the value I get from virtual_procedure1 and use it as input to procedure2?

       

      Warm regards

       

      Morgan