Subject | Re: [ib-support] Creating a Trigger gives Error Msg: Invalid Column type: 0 |
---|---|
Author | Helen Borrie |
Post date | 2002-11-15T12:09:34Z |
At 05:43 PM 15-11-02 +1030, you wrote:
Just curious - are your customers breeding earthworms?
heLen
>Creating a Trigger gives Error Msg: Invalid Column type: 0Colitis (too many colons).
>
>
>CREATE TRIGGER BI_CHECK_ANIMAL_SIRE FOR ANIMAL
> ACTIVE
> BEFORE INSERT
> POSITION 1
>AS
>DECLARE VARIABLE ParentID INTEGER;
>DECLARE VARIABLE ParentSex CHAR(1);
>begin
> if (NEW."Sire ID" IS NOT NULL) then
> begin
> SELECT ID, Sex FROM Animal WHERE (ID = NEW."Sire ID") INTO :ParentID,
> :ParentSex;
>
> if (:ParentID IS NULL) then <-- remove the colon from the variable
> begin
> EXCEPTION EX_Sire_DNE;
> end
>
> if (:ParentSex <> 'M') then <-- as above
> begin
> EXCEPTION EX_Sire_Invalid_Sex;
> end
> end
>end
>
>What's the problem?
Just curious - are your customers breeding earthworms?
heLen