6 Replies Latest reply on Jan 24, 2011 3:26 AM by S.Q. R

    virtual procedure's default value in Procedural Relational Command

    S.Q. R Newbie

      Hi, all


      How to use the default value of virtual procedure in procedural relational command?


      There is a very simple virtual procedure named 'virtualPro1' with two parameters 'para1' and 'para2'.

      'para1' is NO_NULLS and has default value 100.

      'para2' is also NO_NULLS and has default value 200.

      The result is 'sum1', it is the sum of 'para1' and 'para2'.


      I found the default value is ok in EXEC command. The result is 201.

      select * from (exec virtualPro1 (para1 = 1)) as t1;


      But it didn't work in procedural relational command.

      select * from virtualPro1 where para1=1 ;

      I get the below error:

      Processing exception 'No valid criteria specified for procedure parameter test.virtualPro1.para2' 
      Exception type org.teiid.api.exception.query.QueryPlannerException thrown 
      from org.teiid.query.optimizer.relational.rules.RulePlanProcedures.execute(RulePlanProcedures.java:121). 
      Enable more detailed logging to see the entire stacktrace.


      I want use the default values of virtual procedure in procedural relational command.

      Any help are welcome.


      Thank you.


      Best Regards,