I figured it out:
CREATE PROCEDURE MYPROC () RETURNS (NAME CHAR(25))
AS SELECT NAME from person UNION ALL SELECT NAME from class;
Quote:
Originally posted by chuckdudley
Hello Pervasive SQL kings and queens.
I'm using Crystal Reports using a Pervasive 2000i backend. I understand I cannot create a view using UNION. >;-(
So I decided to use a stored procedure. Can someone give me a the syntax to create a stored procedure that simply uses SELECT to return a result set? Here's what it would look like in SQL Server:
CREATE PROCEDURE MYPROC
AS
SELECT name from table A
UNION
SELECT name from table B
How can I create same in Pervasive SQL???? I'm a newbie to Pervasive.
Thanks all for your help!!
|