Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    3

    Red face Unanswered: Delete a Substring

    Good morning,

    I need to delete the first ten characters from a field, I don't know how to write this query to allow me to do so.

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    update table
    set COLUMN = LTRIM(NAME, SUBSTR(COLUMN, 0, 10));
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Dec 2003
    Posts
    3
    UPDATE conitemdescrip
    SET descrip= LTRIM(descrip,SUBSTRING(descrip,0,10));

    Msg 174, level 15 State 1
    the function 'ltrim' requires 1 argument


    Suggestions?

  4. #4
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    You are using MS SQL Server 2000.

    update table
    set column = Right(column, Len(column) - 1)

    - From Visual Basic
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  5. #5
    Join Date
    Dec 2003
    Posts
    3
    No, I am using
    SQL 6.5...

Posting Permissions

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