Professional Web Applications Themes

Was the text column changed? - Microsoft SQL / MS SQL Server

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....

  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. #2

    Default Re: Was the text column changed?


    "Kristofer Gafvert" <kgafvertONLINEilopia.com> wrote in message
    news:OUloRlXQDHA.3796tk2msftngp13.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

  3. #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]meathotmail.com[/email]> wrote in
    message news:#VD9L$XQDHA.4024tk2msftngp13.phx.gbl...
    >
    > "Kristofer Gafvert" <kgafvertONLINEilopia.com> wrote in message
    > news:OUloRlXQDHA.3796tk2msftngp13.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

Similar Threads

  1. Two-column text inside one-column text box?
    By CyrilW@adobeforums.com in forum Adobe Indesign Macintosh
    Replies: 5
    Last Post: July 6th, 05:41 PM
  2. hyphenation in column text
    By Jack Peacock in forum ASP.NET Data Grid Control
    Replies: 6
    Last Post: February 15th, 04:36 AM
  3. Image in header column (not replacing column header text)
    By hansiman in forum ASP.NET Data Grid Control
    Replies: 3
    Last Post: February 7th, 12:17 AM
  4. identify changes in text box when changed by code
    By tim johnson in forum Microsoft Access
    Replies: 2
    Last Post: July 10th, 05:01 PM
  5. Text size in code view changed?
    By Webfairy in forum Macromedia Dreamweaver
    Replies: 4
    Last Post: July 8th, 08:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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