Prob w/ creating an SP
Posted in 1995
Hi Gang,
We're running SE 5.0 over here, and I'd like to start creating some
stored procedures. However, every attempt to do so is giving me an error.
For example, if I create the following procedure (within an sql command
file):
CREATE PROCEDURE test ()
SELECT count(*) FROM billing_toll;
END PROCEDURE;
I receive the following error:
201: A syntax error has occurred.
Error in line 3
Near character position 33
(Char 33 is the "o" in "billing_toll" in this case.)
Another example that bombs:
CREATE PROCEDURE toll_id_reseq ()
CREATE TEMP TABLE toll_id_xref (old_id int, new_id serial);
CREATE UNIQUE INDEX tix_idx on toll_id_xref (old_id);
INSERT INTO toll_id_xref SELECT toll_id, 0 FROM billing_toll;
END PROCEDURE;
And this gives me:
201: A syntax error has occurred.
Error in line 3
Near character position 58
(Char 58 is the "a" in "serial" above).
What gives? I'm don't seem to be violating any SP-creation no-no's.
FYI, I'm also doing this as DBA, and I know for a fact that we're running
5.0 (which is the initial version supporting SP's, right?).
Any input is appreciated!
Thanks, Steve
____ ___ ________ ________
/_ _] /_ ]/ ______)/ ______) _/| Steve Morrow, Sr. Programmer/Analyst
/ _/ / / / (____ / /___ _/ | University of South Florida
/ _/ / / \\____ ) / _____) _/ | Internet: smorrow@dotrisc.cfr.usf.edu
/ _/___/ / ______/ / / / _/ | Voice : (813) 974-6889
(_________)(________)(___)______/ |______________________________________