Subject Re: [ib-support] Creating a Trigger gives Error Msg: Invalid Column type: 0
Author Helen Borrie
At 05:43 PM 15-11-02 +1030, you wrote:
>Creating a Trigger gives Error Msg: Invalid Column type: 0
>
>
>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?

Colitis (too many colons).

Just curious - are your customers breeding earthworms?

heLen