This content has been marked as final.
Show 2 replies
-
1. Re: Stored Procedure With Parameters Teiid 8.7.1
rareddy Jun 15, 2016 10:35 AM (in response to mauriciomag)Here is documentation if you are designing a XML based VDB with DDL. https://teiid.gitbooks.io/documents/content/reference/DDL_Metadata.html#_create_procedure_function
If you are using Designer, what you above should work. Documentation for procedure language is here Procedures · Teiid Documentation
-
2. Re: Stored Procedure With Parameters Teiid 8.7.1
mauriciomag Jun 15, 2016 11:58 AM (in response to rareddy)Thanks Ramesh... There are a final version:
BEGIN DECLARE boolean VARIABLES.cached; VARIABLES.cached = AllCustomer.getCustomersByParam.cached; BEGIN IF(VARIABLES.cached = TRUE) BEGIN SELECT A.CUSTOMERID, A.FIRSTNAME, A.LASTNAME, A.COUNTRY FROM AllCustomer.Customers AS A; END ELSE BEGIN SELECT A.CUSTOMERID, A.FIRSTNAME, A.LASTNAME, 'BR' AS COUNTRY FROM AllCustomer.Customers AS A OPTION NOCACHE; END END END
Regards,