Jason, You should use (string replace) SRPL () rather than SMOVE. UPDATE mytable SET filename = (SRPL (filename, '.jpg', '.png', 0)) WHERE filename IS NOT NULL
Bill On Fri, Dec 5, 2008 at 4:22 PM, Jason Kramer <[EMAIL PROTECTED]> wrote: > I have a table that has a list of file names as one of its columns. All > of the file names are .jpg files, and we just converted to .png because all > the cool kids are using .png files for web design now (or so I'm told). I > am trying to figure out how to update the database so the file name in the > table will now have a .png extension. Only the extension changed. If the > old name was MyPic.jpg, the new name is MyPic.png. > I think that I should use the UPDATE command with an expression, but I'm > not sure what expression to use. In psudocode: > > UPDATE mytable SET filename = (SMOVE(<current value in > filename>,1,SLEN(<current value in filename>) - 3,'',1) + '.png') WHERE > filename IS NOT NULL > > Thanks, > Jason > > -- > Jason Kramer > University Archives and Records Management > 002 Pearson Hall > (302) 831 - 3127 (voice) > (302) 831 - 6903 (fax) > > >

