Results 1 to 3 of 3

Thread: Update Script

  1. #1
    Join Date
    Jan 2004
    Posts
    164

    Unanswered: Update Script

    Hi everyone,

    I have been running into some error when I try to update a table. The code that wrote is a basic update script.

    update #temp
    set level1 =
    'CHARGES'
    from #temp t
    where substring(t.item_code, 1, 2) = '*x'


    Everytime I try to run the script I get an error, and I don't know why. The error that I receive is:

    Server: Msg 8152, Level 16, State 9, Line 1
    String or binary data would be truncated.
    The statement has been terminated.

    Does anyone have any Ideas?

  2. #2
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    I guess field level1 is shorter than string 'CHARGES'.

  3. #3
    Join Date
    Jan 2004
    Posts
    164
    Originally posted by snail
    I guess field level1 is shorter than string 'CHARGES'.
    Absolutely right on that. Level 1 is shorter that charges.

    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
  •