|
You can do something like this to update the third position in a field: Update testfile set fldx = substr(fldx,1,2) concat 'X' concat substr(fldx,4,4) Assuming you have an 8 digit field called fldx where you want to keep positions 1-2 and 4-8 with their current values and place an 'X' in position 3. Fred Gamache Fgamache@nlvl.com -----Original Message----- From: Jim Ackerman [SMTP:packley@voicenet.com] Sent: Monday, November 17, 1997 7:32 PM To: Midrange Systems Mailing List Subject: Substring in SQL update Is there a way to use substr when updating with SQL (at v2r3m0 -- we're a tad behind the times yet)? The manual tells how to select using substr, but not to update or set. Thanks in advance! +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MAJORDOMO@midrange.com | and specify 'unsubscribe MIDRANGE-L' in the body of your message. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MAJORDOMO@midrange.com | and specify 'unsubscribe MIDRANGE-L' in the body of your message. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.