Results 1 to 3 of 3

Thread: Trigger issue

  1. #1
    Join Date
    Mar 2002
    Posts
    162

    Unanswered: Trigger issue

    I'm writing an update trigger. The problem is that one of my declared variables has a text datatype. When I try to compile the trigger I get a
    "TEXT and IMAGE datatypes are invalid for parameters or local variables"

    How can I best work around this considering the fact that I have to update another column (also text datatype) with text in this variable.

    I thought about assignning varchar(255) and then using the convert function on insert into my table, but I might cut of text or the variable might reject its assignment if the text isnt less than 255.

    HELP!!

  2. #2
    Join Date
    Nov 2002
    Posts
    12
    From which source you are getting value for this text field. It must be the trigger table or some other table. You can update the column directly retrieving data from the source by subquery or join.

  3. #3
    Join Date
    Mar 2002
    Posts
    162
    interesting. I actually declared all columns of the trigger table (INSERTED) and then assigned the fields to it. Imight not even need to do that. I'll just used the inserted tables primary keys and link it with the updated table etc...i'li try it. Thanks

Posting Permissions

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