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

    Unanswered: SQL - caracter substitution

    Hi!

    I have a file that has this values:
    12777,85E
    53873,08E
    10652,47E
    7493,99E
    88475,70E
    57497,78E

    I want to make an sql statement where i substitute the 'E' by a ' '.
    I made this sql but it doesn't function.

    update mybibl/fichspool
    set substr(fichspool, 67, 1)=' '
    where substr(fichspool, 67, 1) ='E'
    Token ( was not valid. Valid tokens: =.

    67 is the position in the file where the caracter is.

    Any suggestions?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Try:

    update mybibl/fichspool
    set fichpool = substr(fichpool,1,66) || substr(fichspool, 68)
    where substr(fichspool, 67, 1) ='E'

    Andy

  3. #3
    Join Date
    Dec 2003
    Posts
    5

    Thumbs up SQL - caracter substitution

    Thank's, it solved!


    Quote Originally Posted by ARWinner
    Try:

    update mybibl/fichspool
    set fichpool = substr(fichpool,1,66) || substr(fichspool, 68)
    where substr(fichspool, 67, 1) ='E'

    Andy

Posting Permissions

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