Subject | How to use a stored procedure in a view? |
---|---|
Author | chrisacron |
Post date | 2006-12-15T09:27:07Z |
Hi All
I created a stored procedure TagTree that returns a string value when
passed an IdString.
The following DSQL statement executes fine:
SELECT Id, (SELECT * FROM TagTree(Id)) FROM TagDefinitions
But I cannot create a view that returns that. The following DDL
statement returns an error:
create view TagDescriptions ( ID, Descrition)
as
select ID, (SELECT * FROM TagTree(ID)) AS Description from TagDefinitions
Is there a way to use a stored procedure as a component of the view?
Kind Regards
Chris Laurie
I created a stored procedure TagTree that returns a string value when
passed an IdString.
The following DSQL statement executes fine:
SELECT Id, (SELECT * FROM TagTree(Id)) FROM TagDefinitions
But I cannot create a view that returns that. The following DDL
statement returns an error:
create view TagDescriptions ( ID, Descrition)
as
select ID, (SELECT * FROM TagTree(ID)) AS Description from TagDefinitions
Is there a way to use a stored procedure as a component of the view?
Kind Regards
Chris Laurie