Stored Procedure Syntax Error
Posted in 1999
Topics: Installation, Setup & Upgrades, Stored Procedures & SPL, Server Administration
I am experiencing an odd problem with some SPLs. I am migrating a database
schema from one server to another using dbschema, however when I attempt to
create the associated SPLs they all fail with a syntax error. To prove I
wasn't completely going around the twist I attempted to create the standard
Informix demo procedure found in c_proc.sql using dbaccess - This gave me
the same problem, as follows:
create procedure read_address (lastname char(15))
returning char(15), char(15), char(20), char(15), char(2), char(5);#
^
# 201: A syntax error has occurred.
#
define p_fname, p_city char(15);
define p_add char(20);
define p_state char(2);
define p_zip char(5);
select fname, address1, city, state, zipcode
into p_fname, p_add, p_city, p_state, p_zip
from customer
where lname = lastname;
return p_fname, lastname, p_add, p_city, p_state, p_zip;
end procedure;
The stores7 database exists, as does the customer table, and the user has
DBA privilege.
I am running the following versions:
HP/UX 10.20
INFORMIX-OnLine Version 7.24.UC7
I have recently upgraded to 7.24 from 7.23, if that makes any difference?
Any help much appreciated.
TIA
Chris West
chris.west@medas.co.uk
Remember that you can only create SPs using dbaccess (NOT isql)!
Kleanthis