Was the text column changed?

Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.

  1. #1

    Default Was the text column changed?

    I have a trigger on update, but i need to know if a specified column of the
    data type TEXT was changed or not. Since it's TEXT, i cannot use '=', so,
    is there any other way to do this?

    Thanks!

    --
    Regards,
    Kristofer Gafvert
    [url]http://www.ilopia.com[/url] - Useful help for Windows Server 2003
    Reply only to newsgroup(s), if you by some reason must contact me, remember
    to remove the "online" part of my address.



    Kristofer Gafvert Guest

  2. Similar Questions and Discussions

    1. Two-column text inside one-column text box?
      Hello everybody, I'm working on a small size book with a one-column text box threaded through the whole thing. There are some short lists that I'd...
    2. Put `text` column in another table?
      Hi, usually, use of a single table is recommended for performance as only one seek time is required. However, when a table include many columns...
    3. Image in header column (not replacing column header text)
      I have a sortable (asc/desc) datagrid and would like to add a small arrow icon (down/up) next to the column header text to improve the UI. Is this...
    4. identify changes in text box when changed by code
      I have a list box that use code to populate a bound textbox when the list box is double clicked. I want to attach an event whenever the textbox...
    5. Text size in code view changed?
      This is a new one for me ... I am working with some HTML a programmer gave me to pretty up with CSS. I finished working on one file, closed it,...
  3. #2

    Default Re: Was the text column changed?


    "Kristofer Gafvert" <kgafvertONLINE@ilopia.com> wrote in message
    news:OUloRlXQDHA.3796@tk2msftngp13.phx.gbl...
    > I have a trigger on update, but i need to know if a specified column of
    the
    > data type TEXT was changed or not. Since it's TEXT, i cannot use '=', so,
    > is there any other way to do this?
    >
    > Thanks!
    >
    First check if the column was even updated with UPDATE(column).
    Then check the datalength(), if that's different, it changed.
    If the column was updated and the datalength is the same, then you must read
    through it 8000 characters at a time using substring() and compare the
    results.

    David


    David Browne Guest

  4. #3

    Default Re: Was the text column changed?

    Thanks!

    --
    Regards,
    Kristofer Gafvert
    [url]http://www.ilopia.com[/url] - Useful help for Windows Server 2003
    Reply only to newsgroup(s), if you by some reason must contact me, remember
    to remove the "online" part of my address.


    "David Browne" <davidbaxterbrowne no potted [email]meat@hotmail.com[/email]> wrote in
    message news:#VD9L$XQDHA.4024@tk2msftngp13.phx.gbl...
    >
    > "Kristofer Gafvert" <kgafvertONLINE@ilopia.com> wrote in message
    > news:OUloRlXQDHA.3796@tk2msftngp13.phx.gbl...
    > > I have a trigger on update, but i need to know if a specified column of
    > the
    > > data type TEXT was changed or not. Since it's TEXT, i cannot use '=',
    so,
    > > is there any other way to do this?
    > >
    > > Thanks!
    > >
    > First check if the column was even updated with UPDATE(column).
    > Then check the datalength(), if that's different, it changed.
    > If the column was updated and the datalength is the same, then you must
    read
    > through it 8000 characters at a time using substring() and compare the
    > results.
    >
    > David
    >
    >

    Kristofer Gafvert Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139