Re: Prob w/ creating an SP
Posted in 1995
Topics: Stored Procedures & SPL, Server Administration
Steve Morrow (smorrow@dotrisc.cfr.usf.edu) wrote:
SM> For example, if I create the following procedure (within an sql command
SM> file):
SM> CREATE PROCEDURE test ()
SM> SELECT count(*) FROM billing_toll;
SM> END PROCEDURE;
SM> I receive the following error:
SM> 201: A syntax error has occurred.
SM> Error in line 3
SM> Near character position 33
SM> (Char 33 is the "o" in "billing_toll" in this case.)
SM> Another example that bombs:
SM> CREATE PROCEDURE toll_id_reseq ()
SM> CREATE TEMP TABLE toll_id_xref (old_id int, new_id serial);
SM> CREATE UNIQUE INDEX tix_idx on toll_id_xref (old_id);
SM> INSERT INTO toll_id_xref SELECT toll_id, 0 FROM billing_toll;
SM> END PROCEDURE;
SM> And this gives me:
SM> 201: A syntax error has occurred.
SM> Error in line 3
SM> Near character position 58
SM> (Char 58 is the "a" in "serial" above).
SM> What gives? I'm don't seem to be violating any SP-creation no-no's.
SM> FYI, I'm also doing this as DBA, and I know for a fact that we're running
SM> 5.0 (which is the initial version supporting SP's, right?).
SM> Any input is appreciated!
Steve,
I think you are simply trying to execute your SQL scripts via `isql' rather
than `dbaccess' :-)
___*____
Ciao! | |_ e-mail
(_|oe |or <joefor@iperv.it>