Re: help with sql statement doing substrings and replace

From: Just Another User <zzz_at_zzz.zzz>
Date: Sat, 08 Mar 2003 04:05:18 GMT
Message-ID: <2_daa.56432$gf7.10675642_at_news4.srv.hcvlny.cv.net>


"Figz" <efeigenb_at_alumni.tufts.edu> wrote in message news:3758d0a5.0303071240.659a3f24_at_posting.google.com...
> Hi,
>
> I have columns called FILES with data like
>
> FILES
> -----------------------
> 'hello.pdf'
> 'something.pdf'
> 'noextension'
> 'test01.pdf'
> 'anotherwithnoextension'
>
> and I want to find all the ones in that column that have '%.pdf' in
> them and replace them with everything BUT the .pdf extension. So I
> would end up with:
>
> FILES
> -----------------------
> 'hello'
> 'something'
> 'noextension'
> 'test01'
> 'anotherwithnoextension'
>
> Can someone tell me a sql statement to do that? Thanks!

REPLACE(FILES, '.pdf', '') Received on Sat Mar 08 2003 - 05:05:18 CET

Original text of this message