|
Thanks Vernon, I'll give that a shot. Greg >-----Original Message----- >From: midrange-l-bounces@xxxxxxxxxxxx >[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg >Sent: Tuesday, September 13, 2005 11:16 PM >To: Midrange Systems Technical Discussion >Subject: Re: More SQL fun...selective update > > >You could use a CASE structure in your SQL, something like >this wherever >you have the need to use the date > >update mksrcw >set d2fodt = (select >case eve1dt = 0 > then '1900-01-01' >else > substr(char(eye1dt + 19000000),1,4) || '-' || > substr(char(eye1dt + 19000000),5,2) || '-' || > substr(char(eye1dt + 19000000),7,2) >end >from mssrc where mksrcw.d2comp = eycomp >and mksrcw.d2srcd = eysjcd >and eye1dt > 0) > >or use the case ... then ... else ... end construct in the SQL that >generates your output file - if it does. >At 03:01 PM 9/13/2005, you wrote: >
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.