-
1. Re: Virtual Procedure Syntax
shawkins Nov 12, 2012 1:58 PM (in response to snadji)Samier,
What you show above should work via the procedural relational syntax and will require you access the view using equality or in predicates against a and b. What errors are you seeing?
Steve
-
2. Re: Virtual Procedure Syntax
snadji Nov 12, 2012 4:34 PM (in response to shawkins)I am getting this error:
TEIID31080 View myschema.myview1 validation error: QueryResolverException-Group does not exist: myproc1
I removed everything else from my model so the only thing left in it is:
<model visible="true" type="VIRTUAL" name="myschema">
<metadata type="DDL"><![CDATA[
CREATE VIRTUAL PROCEDURE myproc1
BEGIN
CREATE LOCAL TEMPORARY TABLE temptable1 (a string, b string);
SELECT * FROM temptable1;
END
CREATE VIEW myview1 (
a bigdecimal,
b string
)
AS SELECT * FROM myproc1;
]]>
</metadata>
</model>
-
3. Re: Virtual Procedure Syntax
rareddy Nov 13, 2012 10:30 AM (in response to snadji)try as CREATE VIEW myview1 (a bigdecimal,b string) AS SELECT * FROM myshema.myproc1;
-
4. Re: Virtual Procedure Syntax
shawkins Nov 13, 2012 4:18 PM (in response to rareddy)You should not have to schema qualify if the name is unambiguous. On further inspection it looks like your ddl for the procedure isn't valid. The following works for me on 8.2 CR1:
CREATE VIRTUAL PROCEDURE myproc1 () returns table (a bigdecimal, b string) as
BEGIN
CREATE LOCAL TEMPORARY TABLE temptable1 (a bigdecimal, b string);
SELECT * FROM temptable1;
END;
CREATE VIEW myview1 ( a bigdecimal, b string ) AS
SELECT * FROM myproc1;Steve
-
5. Re: Virtual Procedure Syntax
snadji Nov 16, 2012 12:47 PM (in response to shawkins)This works. Thank you very much!