below is the interbase code
Expand|Select|Wrap|Line Numbers
- SET SQL DIALECT 3;
- SET NAMES NONE;
- SET TERM ^ ;
- CREATE TRIGGER ASSET_BI FOR ASSET
- ACTIVE BEFORE INSERT POSITION 0
- AS
- BEGIN
- /* use parent's label */
- IF(New.parentID IS NOT NULL) THEN
- SELECT label FROM Asset WHERE assetID = New.parentID INTO New.label;
- END
the asset table join to itself...
so exactly what i need 2do is if the parent id is being pass through the insert, then do a look up for the name in the asset table and replace it with the name i'm trying to insert...
any comment is much appriciated
i've spend a whole days and night to try and figure this out... now i'm tired and just about to give up...
thank you in advance