Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011

    Unanswered: Replacing File extenstion

    I'm new to Oracle SQL and I need your help please...
    I have a table called clients and there is a column called pictures..
    I need to update the pictures from ".png" to ".jpg" is that possible?
    I looked in the internet a little bit and I found this command (translate( string1, string_to_replace, replacement_string )).
    Can I use it within a command ?
    update pictures from clients where pictures = translate( string1, string_to_replace, replacement_string );
    Is that possible ??!

    Thanks a lot

  2. #2
    Join Date
    Nov 2003
    Provided Answers: 8
    update clients
        set pictures = replace(pictures, '.png', '.jpg')
    Note that this will replace .png anywhere in the filename.

    More details on the UPDATE statement:

    More details on the REPLACE function:

Posting Permissions

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