This could be simplified a little - just use the case part for the first 3
characters and concat it to the remainder.

update rob/casetest
set testfld =
case
when substr(testfld,1,3)='300'
  then '400'
when substr(testfld,1,3)='310'
  then '410'
...
...
else
  substr(testfld,1,3)
end
|| substr(testfld,4,14)

At 08:46 AM 4/18/02 -0500, you wrote:
>This is a multipart message in MIME format.
>--
>[ Picked text/plain from multipart/alternative ]
>One update:
>
>update rob/casetest
>set testfld=
>case
>when substr(testfld,1,3)='300'
>  then ('400' || substr(testfld,4,7))
>when substr(testfld,1,3)='310'
>  then ('410' || substr(testfld,4,7))
>else
>  testfld
>end



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.