Subject | SP???? |
---|---|
Author | Dion |
Post date | 2002-01-16T13:03:37Z |
Hi,
I get the following error Token unknown line 14 column 29. I am missing
something simple, which I just can't seem to find.
COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;
CREATE PROCEDURE INSERT_BEN AS BEGIN EXIT; END ^
ALTER PROCEDURE INSERT_BEN ( BENEF_ID VARCHAR(15)
,BEN_INITIALS VARCHAR(5)
,BEN_FIRSTNAME VARCHAR(30)
,BEN_SURNAME VARCHAR(30)
,BEN_TITLEID SMALLINT)
RETURNS (BEN_ID INTEGER)
AS
BEGIN
IF (BENEF_ID <> '') THEN
BEGIN
SELECT count(BENID) as Ben_Count
FROM BENEFICIARY
WHERE (ID = :BENEF_ID);
IF ( BenCount >= 1 ) THEN
BEN_ID = GEN_ID( BENID_GEN, 1 )
INSERT INTO BENEFICIARY ( BENID
, ID
, INITIALS
, SURNAME
, FIRSTNAME
, TITLEID)
VALUES ( :BEN_ID
, :BENEF_ID
, :BEN_INITIALS
, :BEN_SURNAME
, :BEN_FIRSTNAME
, :BEN_TITLEID);
END
END
^
SET AUTODDL ON;
SET TERM ; ^
COMMIT WORK;
Thanks,
Dion.
I get the following error Token unknown line 14 column 29. I am missing
something simple, which I just can't seem to find.
COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;
CREATE PROCEDURE INSERT_BEN AS BEGIN EXIT; END ^
ALTER PROCEDURE INSERT_BEN ( BENEF_ID VARCHAR(15)
,BEN_INITIALS VARCHAR(5)
,BEN_FIRSTNAME VARCHAR(30)
,BEN_SURNAME VARCHAR(30)
,BEN_TITLEID SMALLINT)
RETURNS (BEN_ID INTEGER)
AS
BEGIN
IF (BENEF_ID <> '') THEN
BEGIN
SELECT count(BENID) as Ben_Count
FROM BENEFICIARY
WHERE (ID = :BENEF_ID);
IF ( BenCount >= 1 ) THEN
BEN_ID = GEN_ID( BENID_GEN, 1 )
INSERT INTO BENEFICIARY ( BENID
, ID
, INITIALS
, SURNAME
, FIRSTNAME
, TITLEID)
VALUES ( :BEN_ID
, :BENEF_ID
, :BEN_INITIALS
, :BEN_SURNAME
, :BEN_FIRSTNAME
, :BEN_TITLEID);
END
END
^
SET AUTODDL ON;
SET TERM ; ^
COMMIT WORK;
Thanks,
Dion.