Trigger problems with CONCAT

From: Sawt <burger2001_at_yahoo.com>
Date: 13 Mar 2002 10:05:24 -0800
Message-ID: <3586c847.0203131005.5930f3bd_at_posting.google.com>


I have a trigger that runs when records are inserted in my table. Currently, it works fine. The table INKTOMI_CATALOG has the following rows CT_PRODNUM, CT_FORM, CT_DOCTYPE, CT_TITLE, CT_X, CT_Y, CT_DATE, CT_SUFFIX
Here is the trigger:

TRIGGER VIGNETTE.TGR_INS_INKTOMI_CATALOG AFTER     INSERT
    ON "INKTOMI_CATALOG"
BEGIN
UPDATE INKTOMI_CATALOG

SET CT_SUFFIX = SUBSTR(CT_PRODNUM, LENGTH(CT_PRODNUM), 1),
    CT_DOCTYPE = SUBSTR(CT_DOCTYPE, 1, 4),
    CT_DATE = SYSDATE

WHERE CT_PRODNUM = CT_PRODNUM;
END; What I want to to is concatenate the CT_DOCTYPE value at the beginning of the value inserted in CT_TITLE. Here is what I have the trigger doing:

/create or replace TRIGGER VIGNETTE.TGR_INS_INKTOMI_CATALOG AFTER

    INSERT
    ON "INKTOMI_CATALOG"
BEGIN
UPDATE INKTOMI_CATALOG

SET CT_SUFFIX = SUBSTR(CT_PRODNUM, LENGTH(CT_PRODNUM), 1),
    CT_DOCTYPE = SUBSTR(CT_DOCTYPE, 1, 4),
    CT_TITLE = SUBSTR(CT_DOCTYPE, 1, 4) || ' ' || CT_TITLE,
    CT_DATE = SYSDATE

WHERE CT_PRODNUM = CT_PRODNUM;
END;
/

Thie problem is that it seems to get stuck in sort of look when it runs. In the first record, the value for CT_DOCTYPE is "Form" and the value for CT_TITLE is "Form Form Form Form Form Form Form Form Form Form Form Form Form Form U.S. Individual ....." (the original value of CT_TITLE is "U.S. Individual ....."

I am stuck, I can't figure out what the problem is. All help is appreciated. Received on Wed Mar 13 2002 - 19:05:24 CET

Original text of this message