Re: Trouble creating stored procedure
Posted in 1998
Topics: Stored Procedures & SPL, Server Administration, Migration, Import/Export & Data Conversion
Doug Poland wrote:
>
> Greetings,
>
> I'm brand-spanking new to the list so I apologize in advance if my question is covered
> in a FAQ somewhere.
>
> My problem is I cannot create a stored procedure with either the LOAD, UNLOAD, or SYSTEM
> commands. Here's the code...
>
> CREATE PROCEDURE inf_spphonenumbers ( mid INT )>
> DELETE FROM inf_phonenumbers;>
> UNLOAD TO 'phone.in' DELIMITER ','> #^
> # 201: A syntax error has occurred.
> #
> SELECT mstr_id, m_phone, m_fax, svc_phone
> FROM inf_dif_reminder>
> SYSTEM '/usr/diskw2/sql/BuildPhoneNumbers.csh phone.in';
>
> LOAD FROM 'phone.out' DELIMITER ','
> INSERT INTO inf_phonenumbers ( DealerID, MailID, PhoneTypeID, PhoneNumber)>
> END PROCEDURE
>
> DOCUMENT
> 'Builds inf_phonenumbers(MailID)';
>
> BTW, I'm using dbaccess on Informix 4.? on SCO UNIX SVR3.2v4.2
You can't use unload in SPL
--
Paul Watson #
WF Software Ltd # It said run using Windows 95
Tel: +44 1436 674629 # or better in the manual
Fax: +44 1436 678693 # so I used Unix
www.wfsoftware.co.uk #