View Full Version : Stored proc using select
chuckdudley
09-04-03, 09:42
| 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!! |
chuckdudley
09-04-03, 15:00
I figured it out:
CREATE PROCEDURE MYPROC () RETURNS (NAME CHAR(25))
AS SELECT NAME from person UNION ALL SELECT NAME from class;
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!!
vBulletin v3.5.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.