Re: SPL-problem/question
Posted in 1998
This is a multipart message in MIME format
--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: quoted-printable
Dirk,
=20
ISQL doesn't uinderstand stored procedures=2E You need to create it=20
within dbaccess=2E
=20
Davin
______________________________ Reply Separator ____________________________=
_____
Subject: SPL-problem/question
Author: PC {dirk=2Eniemeier@stueken=2Ede} at INTERNET
Date: 24/02/98 18:50
=20
--------------E55AF3A2D3108964DE41629B=20
Content-Type: text/plain; charset=3Dus-ascii=20
Content-Transfer-Encoding: 7bit
=20
hello,
=20
I try to create the known upper-prodedure from June Tong, but I'll get=20
an syntax-error already at the beginning=2E
I down know my mistake=2E
We are using SE and I try the statement with ISQL and=20
query-language selection=2E
=20
--
-- Procedure: GetCharAt()
-- Get a character from a string at a specified position=2E=20
--
--DROP PROCEDURE GetCharAt;
=20
CREATE PROCEDURE GetCharAt(str CHAR(255), pos INTEGER)
RETURNING CHAR(1); ^
| here is the error-cursor blinking
=20
DEFINE i INTEGER;
IF pos > 1 THEN
FOR i =3D 2 TO pos
LET str =3D str[2,255];
END FOR;
END IF
RETURN str[1,1];
END PROCEDURE;
=20
bye
Dirk Niemeier
=20
=20
--------------E55AF3A2D3108964DE41629B=20
Content-Type: text/html; charset=3Dus-ascii=20
Content-Transfer-Encoding: 7bit
=20
<HTML>
hello,
=20
<P>I try to create the known upper-prodedure from June Tong, but I'll get=20
<BR>an syntax-error already at the beginning=2E
<BR>I down know my mistake=2E
<BR>We are using SE and I try the statement with ISQL and=20
<BR>query-language selection=2E
=20
<P>--
<BR>-- Procedure: GetCharAt()
<BR>-- Get a character from a string at a specified position=2E=20
<BR>--
<BR>--DROP PROCEDURE GetCharAt;
=20
<P><TT>CREATE PROCEDURE GetCharAt(str CHAR(255), pos INTEGER)</TT>=20
<BR><TT> RETURNING CHAR(1);</TT>=20
<BR><TT> &=
nbs=20
p;
^</TT>
<BR><TT> &=
nbs=20
p;
| here is the error-cursor blinking</TT><TT></TT>
=20
<P><TT> DEFINE i INTEGER;</TT>=20
<BR><TT> IF pos > 1 THEN</TT>=20
<BR><TT> FOR i =3D 2 TO pos</TT>
<BR><TT> LET str =3D=20
str[2,255];</TT>
<BR><TT> END FOR;</TT>=20
<BR><TT> END IF</TT>
<BR><TT> RETURN str[1,1];</TT>=20
<BR><TT>END PROCEDURE;</TT>
=20
<P>bye
<BR> Dirk Niemeier
<BR> </HTML>
=20
--------------E55AF3A2D3108964DE41629B--
=20
=20
**********************************************************************
DST International Tel:+44 181 390 5000 www=2Edstinternational=2Eco=2Eu=
k=20
This message and any attachments to it is intended only for the=20
individual or company to which it is addressed and may contain=20
information which is privileged, confidential or prohibited from=20
disclosure or unauthorised use=2E If the recipient of this=20
transmission is not the intended recipient, or the employee or agent=20
responsible for delivering such materials to the intended recipient,=20
you are hereby notified that any use, any form of reproduction,=20
dissemination, copying, disclosure, modification, distribution and/or=20
publication of this e-mail message or its attachments other than by=20
its intended recipient is strictly prohibited by the sender=2E =20
If you have received it in error, please notify us immediately by=20
telephone on the number above and destroy the message and all copies=20
in your possession=2E
**********************************************************************
--------------InterScan_NT_MIME_Boundary--