thanks Pete worked like a champ just had to add the date selection to the where, I knew it was simple, so now I can run these puppies tomorrow morning right after save finishes and get back to my "other" fires............ On 11/28/06, Pete Helgren <Pete@xxxxxxxxxx> wrote:
UPDATE MYFILE SET DOCNUM = (DOCNUM - 27000) + 72000 WHERE DOCNUM between 27000 and 27200 Something like that should work. Copy the file to another library and give it a try. Pete Helgren Mark Allen wrote: > I have 3 PF's where for a range of #'s I need to "fix" that # > > Example > > > Field: DOCNUM > > if DOCNUM is in the range 27000 to 27200 and the field DATE=20061120 then I > need to change the DOCNUM field to 72000 to 72200 (the first 2 digits are > transposed and need reversed) > > I'd like to do this thru SQL (I need to do it after tonights save) but not > doing a lot with SQL (I did the SELECT's OK interactively). This is a one > time shot and don't really want to write programs to do it if I can help it. > > > I've done simple UPDATES but not changing just a "part" of a field. > -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.