Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Posts
    30

    Question Unanswered: Trigger Failing!! I NEED HELP!!!

    HELP!

    I have a table with a field called remarks as text field. I have a trigger on it,
    "Create Trigger trg_inbox_bess506a_mstr_on_del
    On dbo.inbox_bess506a_mstr
    For Delete
    As
    -- 040226, archive inbox to arc
    set nocount on
    insert into inbox_bess_mstr_arc (
    pk_id,
    batch_id,
    py,
    appropriation,
    issueFrom,
    issueTo,
    submitBy,
    submitDate,
    validID,
    validDate,
    approveDate,
    approveBy,
    accountCode,
    transType
    --remark
    )
    select
    pk_id,
    batch_id,
    py,
    appropriation,
    issueFrom,
    issueTo,
    submitBy,
    submitDate,
    validID,
    validDate,
    approveDate,
    approveBy,
    accountCode,
    transType
    --remark
    from deleted
    return



    GO"

    It fails with an error message:
    "Server: Msg 21, Level 22, State 1, Procedure
    trg_inbox_bess506a_mstr_on_del,
    Line 8
    WARNING - Fatal Error 7113 occurred at Dec 22 2004 11:25PM. Please
    note the
    error and time, and contact your System Administrator."

    It's failing on a field with remarks greater than 1885 chars.

    When I used a stored procedure to do the same, it worked. Why is the trigger failing now? Is there a limit on size for triggers and not procedures?

    THANKS!!!!!!

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Have you verified that the datatypes for Remark are exactly identical in both tables?
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Oct 2004
    Posts
    30
    yes, they are both text fields. I am working with sql server 6.5.

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    6.5?

    Dunno. Could have something to do with being stored as TEXT rather than CHAR or VARCHAR. TEXT data is not stored with the record. Rather, the record holds a pointer to where the TEXT data is stored.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •