Subject | This trigger |
---|---|
Author | ShepherdHill DB Subscriptions |
Post date | 2006-07-04T08:41:56Z |
Hi,
What am I doing wrong here?
----
SET TERM ^ ;
CREATE TRIGGER HALL_ALL_NAMA ACTIVE
BEFORE INSERT POSITION 0
AS
BEGIN
NEW.nama = (SELECT nama FROM pool WHERE matric = NEW.matric);
END^
SET TERM ; ^
----
Tables Structures:
----
CREATE TABLE POOL(
DEPT Varchar(3) NOT NULL COLLATE NONE,
MATRIC Varchar(9) NOT NULL COLLATE NONE,
NAMA Varchar(60) NOT NULL COLLATE NONE,
LEVELL Varchar(1) NOT NULL COLLATE NONE,
ALL_VAL D_BOOLEAN DEFAULT 0 NOT NULL,
CONSTRAINT PK_POOL_1 PRIMARY KEY (MATRIC)
);
CREATE TABLE HALL_ALLOCATION(
HALL Varchar(2) NOT NULL COLLATE NONE,
MATRIC Varchar(9) NOT NULL COLLATE NONE,
NAMA Varchar(60) NOT NULL COLLATE NONE,
SESSION Varchar(9) NOT NULL COLLATE NONE,
ALLOCATION Varchar(14) NOT NULL COLLATE NONE,
REMARK Varchar(100) COLLATE NONE,
ALL_VAL D_BOOLEAN DEFAULT 0 NOT NULL,
CONSTRAINT PK_HALL_ALLOCATION_1 PRIMARY KEY (MATRIC,SESSION)
);
Error Message:
----
SQL Message : -206
Column does not belong to referenced table
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -206
Subselect illegal in this context
Tested on version 1.5.3 and 2.0 RC2.
Regards.
Chris.
___________________________________________________________
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
http://uk.docs.yahoo.com/nowyoucan.html
What am I doing wrong here?
----
SET TERM ^ ;
CREATE TRIGGER HALL_ALL_NAMA ACTIVE
BEFORE INSERT POSITION 0
AS
BEGIN
NEW.nama = (SELECT nama FROM pool WHERE matric = NEW.matric);
END^
SET TERM ; ^
----
Tables Structures:
----
CREATE TABLE POOL(
DEPT Varchar(3) NOT NULL COLLATE NONE,
MATRIC Varchar(9) NOT NULL COLLATE NONE,
NAMA Varchar(60) NOT NULL COLLATE NONE,
LEVELL Varchar(1) NOT NULL COLLATE NONE,
ALL_VAL D_BOOLEAN DEFAULT 0 NOT NULL,
CONSTRAINT PK_POOL_1 PRIMARY KEY (MATRIC)
);
CREATE TABLE HALL_ALLOCATION(
HALL Varchar(2) NOT NULL COLLATE NONE,
MATRIC Varchar(9) NOT NULL COLLATE NONE,
NAMA Varchar(60) NOT NULL COLLATE NONE,
SESSION Varchar(9) NOT NULL COLLATE NONE,
ALLOCATION Varchar(14) NOT NULL COLLATE NONE,
REMARK Varchar(100) COLLATE NONE,
ALL_VAL D_BOOLEAN DEFAULT 0 NOT NULL,
CONSTRAINT PK_HALL_ALLOCATION_1 PRIMARY KEY (MATRIC,SESSION)
);
Error Message:
----
SQL Message : -206
Column does not belong to referenced table
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -206
Subselect illegal in this context
Tested on version 1.5.3 and 2.0 RC2.
Regards.
Chris.
___________________________________________________________
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
http://uk.docs.yahoo.com/nowyoucan.html