|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Nice addition. Some people might argue that our logic would cause people to stop and think about what this is doing versus some traditional methods. Frankly I don't see a problem with stopping and thinking. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin Vernon Hamberg <vhamberg@attbi.com> Sent by: midrange-l-admin@midrange.com 04/18/2002 08:57 AM Please respond to midrange-l To: midrange-l@midrange.com cc: Fax to: Subject: Re: SQL Update ? 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 _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.